Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3970414
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:04:59+00:00 2026-05-20T04:04:59+00:00

Atom: The Atom is the datatype used to describe Atomic Sentences or propositions. These

  • 0
  1. Atom: The Atom is the datatype used to describe Atomic Sentences or propositions. These are basically
    represented as a string.
  2. Literal: Literals correspond to either atoms or negations of atoms. In this implementation each literal
    is represented as a pair consisting of a boolean value, indicating the polarity of the Atom, and the
    actual Atom. Thus, the literal ‘P’ is represented as (True,”P”) whereas its negation ‘-P’ as
    (False,”P”).
    2
  3. Clause: A Clause is a disjunction of literals, for example PvQvRv-S. In this implementation this
    is represented as a list of Literals. So the last clause would be [(True,”P”), (True,”Q”),
    (True,”R”),(False,”S”)].
  4. Formula: A Formula is a conjunction of clauses, for example (P vQ)^(RvP v-Q)^(-P v-R).
    This is the CNF form of a propositional formula. In this implementation this is represented as a list of
    Clauses, so it is a list of lists of Literals. Our above example formula would be [[(True,”P”),
    (True,”Q”)], [(True,”R”), (True,”P”), (False,”Q”)], [(False, “P”),
    (False,”P”)]].
  5. Model: A (partial) Model is a (partial) assignment of truth values to the Atoms in a Formula. In this
    implementation this is a list of (Atom, Bool) pairs, ie. the Atoms with their assignments. So in the
    above example of type Formula if we assigned true to P and false to Q then our model would be
    [(“P”, True),(“Q”, False)]

Ok so I wrote and update function

       update :: Node -> [Node] 

It takes in a Node and returns a list of the Nodes
that result from assigning True to an unassigned atom in one case and False in the other (ie. a case
split). The list returned has two nodes as elements. One node contains the formula
with an atom assigned True and the model updated with this assignment, and the other contains
the formula with the atom assigned False and the model updated to show this. The lists of unassigned
atoms of each node are also updated accordingly. This function makes use of an
assign function to make the assignments. It also uses the chooseAtom function to
select the literal to assign.

    update :: Node -> [Node]
    update (formula, (atoms, model)) = [(assign (chooseAtom atoms, True) formula, (remove (chooseAtom atoms) atoms, ((chooseAtom atoms,True)) `insert` model)) , (assign (chooseAtom atoms, False) formula, (remove (chooseAtom atoms) atoms, ((chooseAtom atoms, False) `insert` model)) )] 

Now I have to do the same thing but this time I must implement a variable selection heuristic.this should replace the chooseAtom and I’m supposed to write a function update2 using it

    type Atom = String
    type Literal = (Bool,Atom)
    type Clause = [Literal]  
    type Formula = [Clause]
    type Model = [(Atom, Bool)]
    type Node = (Formula, ([Atom], Model))
   update2 :: Node -> [Node]
   update2 = undefined

So my question is how can I create a heurestic and to implement it into the update2 function ,that shoud behave identical to the update function ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:05:00+00:00Added an answer on May 20, 2026 at 4:05 am

    If I understand the question correctly, you’re asking how to implement additional selection rules in resolution systems for propositional logic. Presumably, you’re constructing a tree of formulas gotten by assigning truth-values to literals until either (a) all possible combinations of assignments to literals have been tried or (b) box (the empty clause) has been derived.

    Assuming the function chooseAtom implements a selection rule, you can parameterize the function update over an arbitrary selection rule r by giving update an additional parameter and replacing the occurrence of chooseAtom in update by r. Since chooseAtom implements a selection rule, passing that selection rule to the parameter r gives the desired result. If you provide an implementation of chooseAtom and the function you intend to replace it, it would be easier to verify that your implementation is correct.

    Hopefully this is helpful. However, it’s unclear exactly what’s being asked. In particular, you’re asking for a “variable selection rule.” However, it looks like you’re implementing a resolution system for propositional logic. In general, selection rules and variables are associated with resolution for predicate logic.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have these entity kinds: Molecule Atom MoleculeAtom Given a list(molecule_ids) whose lengths is
I must write a function to_string wich receives this datatype datatype prop = Atom
I write code given below to read Atom feed. string strUrL = http://loluyede.blogspot.com/atom.xml; WebRequest
I want to parse atom feeds of youtube channel. Here is the link of
I've got an atom feed in my application that's build using atom_feed , and
I have a simple Atom 1.0 feed that I've generated, similar to the example
I'm currently stuck with using Atom CPU desktop for my Android app development. What
I have this code to create an ATOM feed Dim xmlResult As New StringBuilder
How do I go about creating an atom feed in PHP?
I have a ready RSS atom feed on my ASP.net site,but I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.