Question

Program by force brute in (c++ or java language )

The question of validity is to answer the question of whether for a Boolean expression consisting of n variables . There is a combination of values of variables that make the result of the expression true or not. In this phrase each The variable can be simple or contradictory. Force brute method of all compounds . Creates and evaluates the possible and the first time the result is true (if it is) the answer to the problem Come and stop the operation. If all cases are checked and the expression is not true with any combination, the answer: (The question is negative). Implement the validity problem for the force brute method. Note the number of variables . It is not clear and will be entered into the routine as an argument. If the number of variables was constant, you could use Multiple overlapping loops do the job simply, but this is not the case and generally use multiple loops Interference will not be acceptable. You must provide two versions of the software, one recursive and the other non-recurring .

Recursive and both must be force brute and both must work properly.

(It is better for your program to read the input from a file whose address is given as input or specified in the program. This file contains a number of Boolean expressions, each written in a separate line. You can also use common symbols for operators (for and from *, for or from +, for not from~, And for parentheses from parentheses). If you have already written the program and specified the Boolean phrase in the program (as a string or any other form), please explain in full in your description file and specify how the phrase can be changed (Write a program in one of the programming languages such as c or c ++ or Java or any other language you know and send all the files related to the program along with a description file (on how to run the program). Your program should receive a Boolean expression (such as A or B) as input and report on the output whether there is a combination of variable values that make the expression true. For example, the answer is "yes" because if A or B or both are true, the result of evaluating the Boolean expression is true

 thank you 

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 9 more requests to produce the answer.

1 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Program by force brute in (c++ or java language )
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Question The answer of this question has been attached, and the questions that should be answered...

    Question The answer of this question has been attached, and the questions that should be answered is also attached. The question was: Write pseudocode for a brute force algorithm for each of the following, and determine its time and space complexity. 1. Determine whether a given Boolean expression is satisfiable. Notes: A.) A Boolean expression is one written using only the three Python connectives (and, or, not), and variables ranging over True and False, and parentheses. B.) A Boolean expression...

  • Help write down below program with C++ language!!! Please... The Cipher Program Requirements An interactive program...

    Help write down below program with C++ language!!! Please... The Cipher Program Requirements An interactive program is required that allows a user to encode text using any of three possible ciphers. The three ciphers you are to offer are: Caesar, Playfair and Columnar Transposition. • The program needs to loop, repeating to ask the user if they wish to play with Caesar, Playfair or Columnar Transposition until the user wishes to stop the program. •For encoding, the program needs to...

  • Java 6.11 LAB: Brute force equation solver Numerous engineering and scientific applications require finding solutions to...

    Java 6.11 LAB: Brute force equation solver Numerous engineering and scientific applications require finding solutions to a set of equations. Ex 8x + 7) = 38 and 3x - 5y = -1 have a solution x = 3, y = 2. Given integer coefficients of two linear equations with variables x and y, use brute force to find an integer solution for X and y in the range - 10 to 10 Ex: If the input is 8 7 38...

  • PLEASE INCLUDE COMMENTS In java Create a Java Program Add the following comments at the beginning...

    PLEASE INCLUDE COMMENTS In java Create a Java Program Add the following comments at the beginning of the file: Your name. The name of the class(es) used in the program. The core concept (found below) for this lesson. The date the program was written. Include a recursive method separate from the main method that will add together all of the even numbers between and including 1 and the value the user supplies. For instance, if the user enters 10 then...

  • 3. (50%) Use a programming language you familiar with to implement the brute force method and...

    3. (50%) Use a programming language you familiar with to implement the brute force method and the branch and bound algorithm, both of which were already introduced in the class, for solving the traveling salesperson problem (35%). Compare their running time when the input size n is from 5 to 15 in steps of 1 (15%). Note that for each n, you should generate three problem instances and average the running time of solving these three instances. To verify the...

  • //I NEED THE PROGRAM IN C LANGUAGE!// QUESTION: I need you to write a program which...

    //I NEED THE PROGRAM IN C LANGUAGE!// QUESTION: I need you to write a program which manipulates text from an input file using the string library. Your program will accept command line arguments for the input and output file names as well as a list of blacklisted words. There are two major features in this programming: 1. Given an input file with text and a list of words, find and replace every use of these blacklisted words with the string...

  • Write a java program for the following: Your program reads an infix expression represented by a...

    Write a java program for the following: Your program reads an infix expression represented by a string S from the standard input (the keyboard). Then your program converts the infix expression into a postfix expression P using the algorithm. Next, your program evaluates the postfix expression P to produce a single result R. At last, your program displays the original infix expression S, the corresponding postfix expression P and the final result R on the standard output ( the screen...

  • Microsoft Visual Studios 2017 Write a C++ program that computes a student’s grade for an assignment...

    Microsoft Visual Studios 2017 Write a C++ program that computes a student’s grade for an assignment as a percentage given the student’s score and total points. The final score must be rounded up to the nearest whole value using the ceil function in the <cmath> header file. You must also display the floating-point result up to 5 decimal places. The input to the program must come from a file containing a single line with the score and total separated by...

  • CIT 149 Java 1 programming question Use DrJava to compile the following try-catch program ? The...

    CIT 149 Java 1 programming question Use DrJava to compile the following try-catch program ? The Assignment ? Specifications General Structure your file name and class name on the following pattern: The first three letters of your last name (begin with upper case.). Then the first two letters of your first name (begin with upper case.). Follow this with the name of the program: TryCatch. For a student called ’John Doe,’ the class name and file name would be: DoeJoTryCatch...

  • Infix Expression Evaluator For this project, write a C program that will evaluate an infix expression. The algorithm REQ...

    Infix Expression Evaluator For this project, write a C program that will evaluate an infix expression. The algorithm REQUIRED for this program will use two stacks, an operator stack and a value stack. Both stacks MUST be implemented using a linked list. For this program, you are to write functions for the linked list stacks with the following names: int isEmpty (stack); void push (stack, data); data top (stack); void pop (stack); // return TRUE if the stack has no...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT