Giter Site home page Giter Site logo

kmap's People

Contributors

quantifiedcode-bot avatar trmittal24 avatar zhchoward avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kmap's Issues

Don't care

I checked your code it seems that the don't care function is developed but it is not called anywhere in the kmap.py the don't care is missed in the minterms:
minterms = Minterms(minterms = t_minterms, not_cares)

but if you do so, in the Minterms function it adds up the not_cares with minterms and simplify them! which is not correct!
for example: if we have:
str_terms = ["0000","0001","0100","1000","1010","1011","1111"]
terms_not_care = ["0110","0101"]

so the final result should be: ["0 * 0 *", "1 * 1 1", "1 0 * 0"]
but since it is adding up the minterms and the not cares, it is generating ["0 * 0 *", "1 * 1 1", "0 1 * 0", "1 0 * 0"]
which means that all not_cares are considered to be one!
I think that can be fixed by developing a code. That is adding every not_care and its combinations (for not_care in not_cares) to the minterms and simplify for each of them and at the end, the final result will be the simplified minterms with the shortest length. I am trying to solve the issue. I will let you know when I could debug it, or let me know if you can fix it.
Thank you and you did a good job!

Bug in the code

Hi @zhcHoward ,

There seems to be a bug in the algorithm.

I was trying with input

str_terms= ["0001","0010","1001","1011","1100","1110","1111"]
terms_not_care = []

The answer outputed by the code is:
[11*0, 0010, *001]

But the right answer is:
[11*0, 0010, *001, 1*11]

I was trying to debug the code, the issue seems to be with remove_repeated_sources which makes source list empty for everything except [11*0, 0010, *001].

Before remove_repeated_sources, we have the term 1*11 but it source list is made empty and then its removed by remove_redundant sources.

I did try to find a solution, but couldn't come across any.

Glad to work it out together.

How can i count numbers of the result?

Hello, very pleasure to ask you a question.

In the example, the output is ['10**', '10', '110']('' means the variable on that position has been simplified).

But the result can't be counted, I want numbers of "*", or "0", "1",
What can i do?

Thank you very much~

Oh I got it~~~

Source meaning

Hi @zhcHoward , great project.
I have just a small question, what does "source" mean? What is it's role?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.