SAT normal conjunctiva form - sat

Do you think that it is possible to compile a propositional formula towards a SAT problem of similar size whose solution allows us to find a valuation which satisfies the starting formula? If so, explain the method you would use.
Thanks in advance.

This questions seems to be already answered here:
How to convert a propositional formula to conjunctive normal form (CNF)?
SAT-solvers usually take a CNF in dimcas format as input.

Related

How do I stop a spread sheet from auto correcting to a date?

I want to turn off auto-correcting to dates. I have been using spreadsheets for years and never, not once, have I ever used or wanted a date. I want the cell to compute an equation. I want to put in =3/12, or =6/12, or =9/12 equations and have it return an answer of .25, 0.5, or .75 instead of an auto-corrected date. I do not want to use ' because it will keep the fraction text instead of returning an answer from the equation, it would be the same thing if I changed the cell to text, it will no longer calculate an equation. I have put an equal sign in front because that is usually how you indicate that you want it to be an equation, but it still changes the equations to dates. Other equations work and when I put these fractions inside of other equations they work, but they do not work as stand-alone equations, neither does =90/3 or any other. They all get turned into dates and I need them to be used as equations. And yes, I need to be using a spreadsheet and yes, I want to use Open Office. I just want to know how to get it to do what I want it to do. Please Help. I have seen other forums on this topic and many arguments have ensued for no good reason. I just need help with this one simple thing, thank you.

Why is MAX-SAT a generalisation of the SAT problem?

According to Wikipedia, the maximum satisfiability problem (MAX-SAT) is the problem of determining the maximum number of clauses, of a given Boolean formula in conjunctive normal form, that can be made true by an assignment of truth values to the variables of the formula. It is a generalisation of the Boolean satisfiability problem, which asks whether there exists a truth assignment that makes all clauses true.
I do not understand the 2nd sentence on how MAX-SAT is a generalisation of SAT. According to Wikipedia, SAT asks whether the variables of a given Boolean formula can be consistently replaced by the values TRUE or FALSE in such a way that the formula evaluates to TRUE.
The reason why I am asking this is because of the paper 'Semidefinite Optimization Approaches for Satisfiability and Maximum-Satisfiability Problems', where I would like to try Semidefinite optimisation techniques to solve some SAT problems I have at hand.
Imagine turning each of your clauses to implications, by adding p -> q where p is a fresh variable for each clause q you have in your original problem. Then, a satisfying instance to this modified problem is a solution to MAXSAT problem of the original, when you pick those clauses where the solver assigned true to the corresponding p. This gives you a maxsat solver, albeit a crappy one.
Now imagine you have a system that makes sure it makes as many of those p's true as possible. That combination now gives you a maxsat solver, i.e., one that can optimize the number of ps that are true. This way you get a nice maxsat solver for your original problem, i.e., you can reduce the maxsat problem to sat, provided you have something that maximizes the number of true assignment to those p's that you introduce through the translation.
#PatrickTrentin can probably explain much better! The vZ paper (the maxsat engine associated with z3) is also a very nice and simple read on this topic: https://backend.orbit.dtu.dk/ws/portalfiles/portal/110977246/Bj_rner_Phan_Fleckenstein_Unknown_Z_An_Optimizing_SMT_Solver_1.pdf

how do I convert a base ten representation to its equivalent two's complement in 7 bit?

how do I convert a base ten representation to its equivalent two's complement in 7 bit?
I am learning applications of discrete mathematics and this is one of the questions, being new to this, I just don't understand
your question lacks some details, especially concerning the environment in which you are working. Do you want to do it by hand or in a specific programming language? What steps did you take to solve the problem by yourself? If you did so, why didn't they answer your question?
Please read more about asking question at https://stackoverflow.com/help/how-to-ask
Furthermore you are asking two separable questions.
All of this contributes to your negative score.
To convert from 10-base to 2-base 2-complement, convert 10-base to 2-base 1-complement and from there to 2-base 2-complement.
From your second question I deduct you have been working on your problem. So I think you already know http://en.wikipedia.org/wiki/Two%27s_complement#From_the_ones.27_complement. There is also a nice example.
Flipping a bit means using the NOT-operation on the bit, simply said: turn a 0 into 1 and vice versa. Adding one means increasing the value of the numer by one.

how can I do a *= operator in matlab

I'm trying to do in Matlab:
X = X*-1;
this syntax is a bit annoying, is there a way to do this some other way (like in c++ : x*=-1)
Thank you
Unfortunately there are no increment and compound assignment operators in Matlab. I also remember reading posts by employees at Mathworks saying that they don't intend to add such operators to Matlab.
Steve Lord's reply to the following question illustrates the difficulties involved (way down, reply nr 10 or so): http://www.mathworks.com/matlabcentral/newsreader/view_thread/107451
There is another way! ;-)
X = -X;
Seriously though, I think it's just a matter of habit. There's nothing inherently wrong with that syntax, you are just used to do it differently.

About to begin learning MATLAB on my own

so essentially I have the task to learn matlab decently well in the next few weeks, and I want to really be able to impress the people i'm learning it for, so if you guys have advice, I would greatly appreciate it.
What I'm dealing with Throughout the course of my job I will be dealing largely in two areas.
Formatting and importing data from excel
Interpreting the data in a meaningful way.
I realize the second category is extremely broad, but essentially i'm working with arrays of pricing information to set some standard price for a commodity, so the analysis that I will be doing will be less computationally heavy and will focus more on error getting the data in correctly and accurately and making sure all of the functions that I want to perform are executed correctly. Very basic stuff.
So here's what I'm looking for:
What are the most important topics so that I can import data from excel into matlab perfectly?
What should I study just to get basic functions down that will be applied to entire matrices/arrays?
What should I study prior to studying anything else to get a firm foundation in the subject? (So I don't make stupid syntax errors, etc.)?
Your help is greatly appreciated :)
The first two things you'll want to learn about are (1) the Matlab GUI and (2) the basics of Matlab syntax. A quick visit to the Getting Started section of the Matlab documentation will do you wonders. It should take you less than a day to get through the basics. Do note that the Matlab documentation is generally excellent, and you should use it often.
Beyond that, there are a number of questions here about importing Excel into Matlab (importing from excel, exporting to excel), and there's some excellent docs on the Mathworks site as well (xlsread, xlswrite). Read them and become familiar with the details and common problems. Good luck!
Since you will be using excel it is likely the data you import could come out in cell format. Look into the differences between indexing using matrices and cells. Also, learn early on the difference between [operator] and .[operator] for vector calculations. The second one is element-wise and will most likely solve a lot of issues you'll come across if your records are meant to only relate to one row/column of data
Perhaps you have gained the MATLAB skills you need now, but hopefully this will help someone following the same path later.
The Math Works (developers of MATLAB) run a site called MATLAB Cody.
This site offers a range of problems and a web based MATLAB interpreter so you can test your solutions. When you have a correct solution, you can compare with other solutions to the same problem. Then you can look up the functions others have used in the online MATLAB documentation for more understanding.
The problems focus on regular expressions and cell manipulation which will be very relevant to importing and manipulating Excel data.