|
|
Line 117: |
Line 117: |
| ||Correct | | ||Correct |
| | | |
− | {Look at this graph: | + | {Complete the following; |
− | | |
− | [[File:Graph-4.jpg|300px]]
| |
− | | |
− | select the appropriate options below:
| |
− | |type="[]"}
| |
− | - The degree of vertex A is 3
| |
− | ||Incorrect
| |
− | - The degree of vertex D is 1
| |
− | ||Incorrect
| |
− | + The degree of vertex B is 3
| |
− | ||Correct
| |
− | + The degree of vertex E is 1
| |
− | ||Correct
| |
− | | |
− | {Look at this graph:
| |
− | | |
− | [[File:Graph-4.jpg|300px]]
| |
− | | |
− | select the appropriate options below:
| |
− | |type="[]"}
| |
− | - Directed
| |
− | ||Incorrect
| |
− | + Undirected
| |
− | ||Correct
| |
− | - Weighted
| |
− | ||Incorrect
| |
− | +Unweighted
| |
− | ||Correct
| |
− | | |
− | {Look at this graph:
| |
− | | |
− | [[File:Graph1.png|300px]]
| |
− | | |
− | select the appropriate options below:
| |
− | |type="[]"}
| |
− | - Directed
| |
− | ||Incorrect
| |
− | + Undirected
| |
− | ||Correct
| |
− | + Weighted
| |
− | ||Correct
| |
− | - Unweighted
| |
− | ||Incorrect
| |
− | | |
− | {Look at this graph:
| |
− | | |
− | [[File:Graph2.png|300px]]
| |
− | | |
− | select the appropriate options below:
| |
− | |type="[]"}
| |
− | + Directed
| |
− | ||Correct
| |
− | - Undirected
| |
− | ||Incorrect
| |
− | - Weighted
| |
− | ||Incorrect
| |
− | + Unweighted
| |
− | ||Correct
| |
− | | |
− | {Look at this graph:
| |
− | | |
− | [[File:Graph3.png|300px]]
| |
− | | |
− | Complete the adjacency matrix, use Y & N only: | |
| |type="{}"} | | |type="{}"} |
− | <table style="border:1px solid black;">
| + | A new item must be added to the { back|rear|tail (i) } of the queue. |
− | <tr>
| + | You must remove the item at the { front|head (i) } of the queue. |
− | <td> </td><td>0</td><td>1</td><td>2</td><td>3</td>
| |
− | </tr>
| |
− | <tr>
| |
− | <td>0</td><td>X</td><td>{ Y }</td><td>{ Y }</td><td>{ Y }</td>
| |
− | </tr>
| |
− | <tr>
| |
− | <td>1</td><td> { Y } </td><td>X</td><td> { Y } </td><td> { N } </td>
| |
− | </tr>
| |
− | <tr>
| |
− | <td>2</td><td>{ Y }</td><td>{ Y }</td><td>X</td><td>{ N }</td>
| |
− | </tr>
| |
− | <tr>
| |
− | <td>3</td><td>{ Y } </td><td> { N } </td><td> { N } </td><td>X</td>
| |
− | </tr>
| |
− | </table>
| |
− | | |
− | {Look at this graph:
| |
− | | |
− | [[File:Graph2.png|300px]]
| |
− | | |
− | Complete the adjacency matrix, use Y & N only:
| |
− | |type="{}"}
| |
− | <table style="border:1px solid black;">
| |
− | <tr>
| |
− | <td> </td><td>A</td><td>B</td><td>C</td><td>D</td>
| |
− | </tr>
| |
− | <tr>
| |
− | <td>A</td><td>X</td><td>{ Y }</td><td>{ N }</td><td>{ Y }</td>
| |
− | </tr>
| |
− | <tr>
| |
− | <td>B</td><td> { N } </td><td>X</td><td> { Y } </td><td> { Y } </td>
| |
− | </tr>
| |
− | <tr>
| |
− | <td>C</td><td>{ N }</td><td>{ N }</td><td>X</td><td>{ N }</td>
| |
− | </tr>
| |
− | <tr>
| |
− | <td>D</td><td>{ N } </td><td> { N } </td><td> { N } </td><td>X</td>
| |
− | </tr>
| |
− | </table>
| |
− | | |
− | {Look at this graph:
| |
− | | |
− | [[File:Graph3.png|300px]]
| |
− | | |
− | Complete the adjacency list (separate with commas & no spaces):
| |
− | |type="{}"}
| |
− | <table style="border:1px solid black;">
| |
− | <tr>
| |
− | <td> </td><td>Connected</td>
| |
− | </tr>
| |
− | <tr>
| |
− | <td>0</td><td>{ 1,2,3 }</td>
| |
− | </tr>
| |
− | <tr>
| |
− | <td>1</td><td> { 0,2|0.2 } </td>
| |
− | </tr>
| |
− | <tr>
| |
− | <td>2</td><td>{ 0,1|0.1 }</td>
| |
− | </tr>
| |
− | <tr>
| |
− | <td>3</td><td>{ <nowiki>0</nowiki> } </td>
| |
− | </tr>
| |
− | </table>
| |
− | | |
− | {Look at this graph:
| |
− | | |
− | [[File:Graph2.png|300px]]
| |
− | | |
− | Complete the adjacency list (separate with comma no spaces, use None if nothing is connected):
| |
− | |type="{}"}
| |
− | <table style="border:1px solid black;">
| |
− | <tr>
| |
− | <td> </td><td>Connected</td>
| |
− | </tr>
| |
− | <tr>
| |
− | <td>A</td><td> { B,D }</td>
| |
− | </tr>
| |
− | <tr>
| |
− | <td>B</td><td> { C,D } </td>
| |
− | </tr>
| |
− | <tr>
| |
− | <td>C</td><td>{ None (i) }</td>
| |
− | </tr>
| |
− | <tr>
| |
− | <td>D</td><td>{ None (i) } </td>
| |
− | </tr>
| |
− | </table>
| |
− | | |
− | {Complete the following
| |
− | |type="{}"}
| |
− | You should use an adjacency list when there are { few (i) } edges.
| |
− | | |
− | You should use an adjacency matrix if there are { many (i) } edges. | |
− | | |
− | {Processing adjacency matrix is much simpler because you can have direct access to check if an edge exists
| |
− | |type="()"}
| |
− | +True
| |
− | ||Correct
| |
− | - False
| |
− | ||Incorrect
| |
| | | |
| </quiz> | | </quiz> |