Tags:
view all tags
---+ Graph lab ---++ Learning Objective(s) 1. Be able to represent a graph 1. Be able to implement a breadth first search of a graph 1. Be able to identify difference disconnected subcomponents of a graph 1. Develop quality data on your own ---++ Overview of the problem You are studying the spread of an idea. You are to tell how long it takes to get an idea from one person to another. However, if there is no way to get an idea from one person to another, you are to output how many different isolated communities there are. Communication is allowed to go both ways between any two people. ---++ Specifics * Input layout * first line -> the number of different people in the data (n) * next n lines -> one name per line * next line -> the two people who need to communicate: such as: bob sue * all remaining lines: each line represents a way for person x to talk directly to person y, such as: tom larry * Output: * either: There are "x" away from each other. (If they can talk directly to each other, then they are 1 away) * or: There are five different isolated communities in this data * Assumptions: * There are at most 1000 people involved * Testing. A good testing plan is important to this lab * Be sure to include simple data, regular data, large data, error data. T ---++ Design components * Be sure to include any supporting data structures you use ---++ Optional improvements * Implement a sort not covered in class * Also implement it so that the talking is uni-directional. * Also allow for cost of talking to be variable based on how much a person likes the other. (A smaller number means a greater like). Find the shortest/quickest way to send the message. Display the path.
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r1 - 2021-11-15
-
cathybareiss
Home
Site map
Assessment web
BethelAIResources2026 web
CenterForComputing web
ChatGPT web
Intro2AIatBethel web
Main web
Sandbox web
TWiki web
CenterForComputing Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
Edit
Attach
Copyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback