The repository focuses on implementing basic to intermediate data structure problems using C#. Here’s a detailed look into what this project entails and how it works.

#### Project Overview

This repository primarily addresses two significant problems:

**Distance Matrix Generation**: Creating a distance matrix from points in a 2D plane.

- Distance matrix formula is this:

- Money classification using K-Nearest neighbors (KNN) algorithm. In the end program checking every money if it is real or not with given banknote data. Banknote data has variance, skewness, kurtosis and entropy. Using this values as a authentication value with KNN and proccess them with given test banknotes. Take a look for example money data.

**Money Classification**: Using the K-Nearest Neighbors (KNN) algorithm to classify banknotes based on various features.

#### Repository Structure

The repository contains the following key files:

: The main C# source code file implementing the project logic.`Program.cs`

: The dataset used for training the KNN algorithm.`data_banknote_authentication.txt`

: The dataset used for testing the classification model.`test_data.txt`

#### Detailed Explanation of Each File

`Program.cs`

**Functionality**: This file contains the core logic for both the distance matrix generation and the money classification tasks. It includes methods to read data, process it, and perform the necessary calculations.**Distance Matrix**: Implements the calculation of distances between points in a 2D plane and outputs a matrix representing these distances.**Money Classification**: Utilizes the KNN algorithm to classify banknotes as real or fake based on their variance, skewness, kurtosis, and entropy.

`data_banknote_authentication.txt`

**Content**: Contains the training data for the money classification task. Each line represents a banknote with its respective features: variance, skewness, kurtosis, and entropy.**Usage**: The data is read into the program to train the KNN model.

`test_data.txt`

**Content**: Contains test data used to evaluate the performance of the trained KNN model.**Usage**: This data is used to verify the accuracy of the classification by comparing predicted results with actual values.

#### Usage Instructions

To run this project:

**Clone the Repository**:`git clone https://github.com/tugcantopaloglu/money-classification.git`

cd money-classification

**Compile and Run**: Open the`Program.cs`

in a C# development environment (such as Visual Studio) and run the program.

#### Conclusion

This repository is an excellent resource for learning about practical implementations of data structures and algorithms. It provides hands-on experience with real-world applications such as distance matrix generation and banknote classification using KNN. By exploring and understanding this project, one can gain valuable insights into the fundamentals of data structures and algorithm design in C#.