Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2008
    Posts
    54
    Rep Power
    0

    Default Quine/Mc Cluskey

    Hello together,

    to be honest I don't know if this is the right place to ask my question but I don't know exactly where else i could do it...

    my problem is that I have to write the Quine/Mc Cluskey code, but I am not understanding how it is working... I looked it up at wikipedia and on a lots of other sides, but they are never telling the way.

    So if I have for example the following boolean function:

    f(A,B,C) = (∼A ∧ ∼B ∧ ∼C) ∨ (∼A ∧ B) ∨ (A ∧ B ∧ ∼C) ∨ (A ∧ C)

    then is the result: (∼A ∧ ∼C) ∨ (A ∧ C) ∨ (B)

    ∧ means and
    ∨ means or
    ∼ means negation

    but how can I get it, I don't know the steps between there... can anybody help me... it would be really nice...

    little_polarbear

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default

    First you need to find/develop the algorithm. Once you have the algorithm then you can design the program and finally write the program.

    No idea where to get the algorithm. Where does the assignment suggest you look for it?

  3. #3
    Join Date
    Jun 2008
    Posts
    54
    Rep Power
    0

    Default

    ok, my mistake, what i actually ment was, that I can also calculate this boolean function just on a piece of paper, without the code... and my idea is, that if i know how to do it on a piece of paper, i can kind of transform it into the java code... because how shall i write a code if i don't know whatthe program is doing and if i see how i can get from the function to the result, i might understand it...

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default

    if i know how to do it on a piece of paper, i can kind of transform it into the java code
    Yes, you should be able to do that. That would be the first step in the design, writing the steps of the algorithm on a piece of paper.
    how shall i write a code if i don't know what the program is doing
    That is a big problem for students. They try to write code before they know what they want the program to do. Design first, then code.

  5. #5
    Join Date
    Jun 2008
    Posts
    54
    Rep Power
    0

    Default

    ok, that's clear, my problem is, that I just know how to use it, when I have a boolean function , where every term has the same length, but I don't know how to do it, if my terms have different lengths... that's my question.... i can do it with the same length on a piece of paper, but not when they are different in thir length, like in my example which i showed in my first post. Can anyone explain me how to get from the first line to the result... i just need the calculation/way and then i can figure out the rest...

    little_polarbear

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default

    If you can do it on a piece of paper, then you need to step back and look at what you are doing and write down what you are doing at each step to get the result. That will be your algorithm.
    Otherwise You need to do a search somewhere to find the algorithm.
    When you get the alogrithm, and have questions about how to implement it in java, post them here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •