Find Jobs
Hire Freelancers

common lisp programming

$10 USD

Closed
Posted over 8 years ago

$10 USD

Paid on delivery
to help solve for instances of 3-SAT.\r\n1. We consider a particular assignment of truth values to our given variables a state in a search graph. We will represent a state in Lisp as a list of pairs. Each pair is a list containing the variable name (a symbol in Lisp) and its corresponding truth value t (true) or nil (false). Write a function eval-var that returns the value associated with a particular variable:\r\n(defun eval-var (var state)\r\n...\r\n)\r\nFor example\r\n> (setf *state* \'((a nil) (b t) (c t) (d nil)))\r\n(A NIL) (B T) (C T) (D NIL))\r\n> (eval-var \'b *state*)\r\nT\r\n> (eval-var \'d *state*)\r\nNIL\r\n2. We will represent a single clause in Lisp as a list of 3 elements. Each element is either a single variable name (i.e., an atom) or a list containing the symbol not followed by a variable name. Write the function eval-clause that\r\nevaluates a clause (i.e., returns t or nil) for a given variables state:\r\n(defun eval-clause (clause state)\r\n...\r\n)\r\nFor example\r\n> *state*\r\n((A NIL) (B T) (C T) (D NIL))\r\n> (setf *clause* \'(a (not b) c))\r\n(A (NOT B) C)\r\n> (eval-clause *clause* *state*)\r\nT\r\n3. Write a function unsat-clauses that returns all the unsatisfied clauses in an expressions for a given state:\r\n(defun unsat-clauses (clauses state)\r\n...\r\n)\r\nFor example\r\n> *state*\r\n((A NIL) (B T) (C T) (D NIL))\r\n> *clauses*\r\n((A (NOT B) C) (A (NOT B) (NOT C)) (A (NOT B) D))\r\n> (unsat-clauses *clauses* *state*)\r\n((A (NOT B) (NOT C)) (A (NOT B) D))
Project ID: 9050251

About the project

2 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
2 freelancers are bidding on average $75 USD for this job
User Avatar
Hello Sir... I am a computer science tutor, I teach (among others) LISP, Prolog and Algorithms. I have done many projects like this, and I'm the top LISP developer, you can check here please: https://www.freelancer.com/freelancers/skills/Lisp/ Please contact me for more details when possible. I look forward to work for you Sir. Best Regards.
$100 USD in 1 day
5.0 (8 reviews)
4.5
4.5
User Avatar
A proposal has not yet been provided
$50 USD in 2 days
5.0 (1 review)
1.4
1.4
User Avatar
Предложение еще не подано
$15 USD in 7 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of KOREA, REPUBLIC OF
Korea, Republic of
0.0
0
Member since Dec 5, 2015

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.