Skip to content

ryanjbudhu/CS435_project2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CS435 Project 2

Section 004 - Ryan Budhu

1. Gonna Take My Horse To The Old Town Node

  • (a) S A C B E F G K L D
  • (b)
    S.neighbors = [A]
    C.neighbors = [A]
    A.neighbors = [S, C, B, E]
    B.neighbors = [A, E]
    E.neighbors = [B, A]
    F.neighbors = [E, G]
    G.neighbors = [F, K]
    K.neighbors = [G, L]
    L.neighbors = [K, D]
    D.neighbors = [L]
    
  • (c)
    DFS > BFS

2. Boulevard of Broken Cheese

  • (a) 25 Nodes
  • (b) Adjacency lists of "touching" nodes
  • (c) Undirected, Acyclic, Connected, Unweighted
  • (d)
    Mouse Maze

3. Traverse This Town

4. Thank U, Vertext

  • (a) A DAG is a connected graph where at least one node has 0 incoming nodes and at least one node has 0 outgoing nodes. There are no cycles in a DAG. In the previous graph every connected node could traverse to and from each other. In a DAG they only move in one direction.
  • (b) DirectedGraph.py
  • (c) main.py
  • (d) TopSort.py
  • (e) TopSort.py

5. Uno, Do’, Tre’, Cuatro, I Node You Want Me

6. When You Wish Upon A*

  • (a) GridGraph.py
  • (b) main.py
  • (c) The Manhattan Distance is a heuristic that I can use to solve the maze with A*. It is consistent because it is always less than estimated distance. Since the maze can only be solved by moving up, down, left, and right the diagonal distance will always be shorter than the shortest possible path distance. By this definition it is also admissible because it was also never overestimate the shortest distance.
  • (d) main.py
  • (e) main.py

7. Edgextra Credit

  • (a) In a graph with 1000 nodes, the A* algorithm only visits 370 nodes, while the Dijkstra algorithm visits all 1000. The A* algorithm only visits nodes that are the highest chance of being part of the shortest path, while the Dijkstra algorithm visits all the nodes it can before reaching the destination node to compare its results and create the shortest path.

About

Repo for Spring '20 CS 435 Project 2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages