Choosing a structure
1.[3p] Why is polynomial time taken as the definition of efficient, despite being polynomial?
Why is polynomial time taken as the definition of efficient, despite being polynomial?
2.[3p] A algorithm runs at operations per second. How many seconds does take, in units of ?
A algorithm runs at operations per second. How many seconds does take, in units of ?
3.[3p] What defines the class NP?
What defines the class NP?
4.[2p] Every problem in P is also in NP.
Every problem in P is also in NP.
5.[3p] A problem is NP-complete when
A problem is NP-complete when
6.[3p] Which of these are real routes to solving an NP-complete problem in practice?
Which of these are real routes to solving an NP-complete problem in practice?
Select all that apply
7.[2p] A workload asks only "is this exact key present", millions of times per second. The right structure is
A workload asks only "is this exact key present", millions of times per second. The right structure is
8.[3p] A leaderboard must report a player's rank among ten million. Which structure answers it in ?
A leaderboard must report a player's rank among ten million. Which structure answers it in ?
9.[3p] Match each workload to the structure it calls for.
Match each workload to the structure it calls for.
Repeatedly take the smallest pending item
Look up by exact key and nothing else
List every key between two bounds
Find routes through a network of links
a hash table
a binary heap
a graph with adjacency lists
a balanced search tree
Show the answer
Repeatedly take the smallest pending item: a binary heap Look up by exact key and nothing else: a hash table List every key between two bounds: a balanced search tree Find routes through a network of links: a graph with adjacency lists