Hello everybody!
I could really use some advice in c#! I have the following homework in programming, please help me choosing the
easiest one( I only have to make one of them) or just tell me some tips on how to start on them. If you have some
codes like these please share with me if you can, Ill try to learn something from them.
Thanks very much!
Common requirements:
- The surface layer (GUI), separate from the logical
layer (graph data structure, algorithm) by splitting the class.
- The graphical representation must be achieved and the algorithm
szemlélteni running on the screen.
- A graph of the algorithm used to it and learned
must be implemented properly.
1. Shortest path
Write a program which is a simple text file stored on a directed graph can display, and peak between the two
specified searches for the shortest route. The text input file in the first row of vertices n and m number of edges
found. The subsequent n lines of the serial number of each peak (1, 2, ..., n) and x, y coordinates are included.
Then m directed edges of the line are given the kezdőpontjukkal, végpontjukkal költségükkel and nonnegative. The
program must be possible to open these files (check the format). Then draw the graph (to display the cost of
living), and when the user clicks one after the other two vertices, then the second from the first search for a
shortest path, and specify the graph. If you click csúcspárra later, the shortest path between them is highlighted.
If there is no directed path between two points in the set, then writes out the program. The search for the shortest
paths using Dijkstra's algorithm.
2. Minimum cost spanning tree
Create a script to a text file stored on a simple undirected connected graph can display, and find a minimum-cost
spanning. The text input file in the first row of vertices n and m number of edges found. The subsequent n lines of
the serial number of each peak (1, 2, ..., n) and x, y coordinates are included. Then m undirected edges of the line
are given in the two non-negative and végpontjukkal költségükkel. The program must be possible to open these files
(check the format). Then draw the graph (to display the cost of living), and the search for a minimal cost spanning.
The tree edges highlight in blue, and the rest in red (see red and blue rule).
3. Topological order
Write a program which is a simple text file stored on a directed graph can display, decide whether to acyclic (DAG),
and if so, to find a topological resolution. The text input file in the first row of vertices n and m number of
edges found. The subsequent n lines of the serial number of each peak (1, 2, ..., n) and x, y coordinates are
included. Then m directed edges of the line are given and the kezdőpontjukkal végpontjukkal. The program must be
possible to open these files (check the format). Then draw the graph (to display the number of vertices), not
whether you e-acyclic (DAG), and if so, write out the vertices of a possible topological arrangements.
4. Labyrinth I
Create a script to a text file which is stored in a maze can display, and two set points in the shortest path
between searches. The text input file in the first row of the maze width n and m in length (1 <= n <= 20, 1 <= m <=
20). The following n lines describe the labyrinth. Each row contains m characters, '. " denotes the open fields and
'#' the walls. The program must be possible to open these files (check the format). Then draw out the maze, and if
the user clicks on a row of two free field, then a search for from the first to the second shortest path, and
indicate the maze. If you click on another two fields, then the shortest path between them is highlighted. If there
is no path between two points in the set, then writes out the program.
5. Labyrinth II.
Create a script to a text file which is stored in a maze can display, and two set points in the shortest path
between searches. Task compared to the previous one nehezítés to have the opportunity to blow up the walls as well.
The operation of the program is given to a neighboring falmező blow up the cost of the shortest paths and
accordingly should be sought. The text input file in the first row of the maze width n and m in length (1 <= n <=
20, 1 <= m <= 20). The following n lines describe the labyrinth. Each row contains m characters, '. " denotes the
open fields and '#' the walls. The program must be possible to open these files (check the format). Then draw out
the maze, and if the user clicks on a row of two free fields, you can search from the first second of a shortest
path (specified by cost-explosive), and indicate the maze. If you click on another two fields, then the shortest
path between them is highlighted.