3 clique problem

The CLIQUE problem takes as input an undirected graph G = (V, E) and an integer k > 2,

and returns True if G contains a clique of size k, i.e a set of vertices C ⊆ V such that |C| = k

and (u, v) ∈ E for all u, v ∈ C.

1. Write a function clique_solver(G,k) that takes a graph G (described below) and integer

k as input and return a Boolean: True in that case that G contains a clique of size k and

False otherwise.

2. Write a function sat_to_clique(F) that takes a formula F (described below) as input and

return a graph G and integer k as output such that:

F is satisfiable ⇐⇒ G has a clique of size k.

3. Write a function sat_solver(F) that makes use of your previous two functions and takes

a formula F as input and returns a Boolean: True in the case where F is satisfiable and

False otherwise.

4. Describe in your own words, how your function sat_solver(F) works and why it is able to

successfully determine whether the input formula F is satisfiable.

Futher Details

You should make use of the following pre-defined classes ]

add_vertex(v) Adds a vertex v to the graph. Returns null.

add_edge(u,v) Adds an undirected edge to the graph from u to v. Adds vertices u and v if not already present. Returns null.

get_vertices() Returns a list of all vertices.

get_edges() Returns a list of all edges.

has_edge(u,v) Returns True if there is an (undirected) edge between u and v.


get_clauses() Returns a list of Clauses (described below)


get_literals() Returns a list of integers representing each clause

(positive literals are represented by positive integers and their corresponding negative literals as their negative counterpart. For example, if P is represented by the integer 2 then ¬P is represented by −2. etc.)

Compétences : Python

en voir plus : oscommerce session problem user able login, make product details page php, make sobi2 details view, if we select you we will use your design pay the wp theme you have chosen (specify cost and platform when you submit) and you wi, if we select you we will use your design pay the wp theme you have chosen specify cost and platform when you submit and you will, make you website in app store, need my 3zog logo cleaned up want to keep the concept the same with the 3 avatars and the triangle, write a cc program that will print the following pattern a user input is shown in boldface in the sample run you need to ask a u, 20 excel tricks which will make you an expert, cannot connect to the website please make sure you have entered the correct url you, sites make sure that the address url of the site that you visit matches the address that you expect and that the address of this, I will able to discuss details with you over chat., problem 3 - using bisection search to make the program faster, if you could cut a donut 3 times what cuts would give you the most pieces, you have 3 projects with the following cash flows, before you make changes recommended by the performance analyzer, you should, 3-step problem-solving approach and the organizing framework, failed to install the app. make sure you have the android development environment set up, your roi on facebook has gone down over the last 3 days what is the first thing you do, what achievements and qualities make you an outstanding candidate for the scholarship

Concernant l'employeur :
( 3 commentaires ) Central, Hong Kong

Nº du projet : #28204581

Décerné à:


I can make it in python3 with the mentioned information . If you have any other requirements you can ask for it.

%selectedBids___i_sum_sub_7% %project_currencyDetails_sign_sub_8% USD en 2 jours
(1 Évaluation)