Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Understand the common complexity classes IN PYTHON coding. A workshop organiser is trying to distribute people into groups so that no group has two people
Understand the common complexity classes IN PYTHON coding.
A workshop organiser is trying to distribute people into groups so that no group has two people who have previously worked together. There's a limit on the number of groups that can be created because each group will be in a separate room. The organiser knows who has worked with whom. Can she distribute the participants as required? The general problem is as follows.
Function:workshop groups
Input: people, an undirected graph; number of groups, an integer
Preconditions: people has n nodes; number of groups n
Output: ok a Boolean
Postconditions: ok is true if and only if the set of nodes of people can be divided into number of groups subsets so that neighbouring nodes are in different subsets.
Attached image is an example graph, with nodes representing people and edges representing work relations.
Qa marks
Describe a certificate for a problem instance a graphpeopleand an integernumber of groups that has a true output. Give as example a certificate for the graph above andnumber of groups
Write your answer here
Qb marks
Explain why certificates for this problem can be verified in polynomial time. In other words, briefly explain what the verifier does, givenpeoplenumber of groups and the corresponding certificate, and why it takes polynomial time.
Write your answer here
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started