Question

Consider the mathematical expression (num1 + num2) × (num3 − num4). We have been asked to...

Consider the mathematical expression

(num1 + num2) × (num3 − num4).

We have been asked to replace num1, num2, num3 and num4 by numbers between 1 and 35, i.e. numbers from the set {1, . . . , 35}, so that after substituting these numbers in place of num1, num2, num3 and num4, the evaluation of the expression using PEDMAS leads to an odd positive integer. Find the number of ways in which this can be done. For example, one way of doing this is to use num1 = 2, num2 = 3, num3 = 5, and num4 = 2. If we substitute these values we will get the expression

(2 + 3) × (5 − 2) = 5 × 3 = 15.

On the other hand, num1 = 1, num2 = 3, num3 = 5, and num4 = 2 leads to an even integer, and num1 = 2, num2 = 3, num3 = 2, and num4 = 5 leads to a negative odd integer, both of which are not allowed.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:-

Given That:-

(num1 + num2) × (num3 − num4).

We have been asked to replace num1, num2, num3 and num4 by numbers between 1 and 35, i.e. numbers from the set {1, . . . , 35}, so that after substituting these numbers in place of num1, num2, num3 and num4, the evaluation of the expression using PEDMAS leads to an odd positive integer. Find the number of ways in which this can be done.

For example, one way of doing this is to use num1 = 2, num2 = 3, num3 = 5, and num4 = 2. If we substitute these values we will get the expression

(2 + 3) × (5 − 2) = 5 × 3 = 15.

On the other hand, num1 = 1, num2 = 3, num3 = 5, and num4 = 2 leads to an even integer, and num1 = 2, num2 = 3, num3 = 2, and num4 = 5 leads to a negative odd integer, both of which are not allowed.

Given,

(num 1+ num 2)*(num 3 - num 4) should be odd positive integer.

Now, product of two integers is odd if and only if both the integers are odd.

=> (num 1 + num 2) is odd integer. It is greater than 0 since both num 1 and num 2 are positive.

=> (num 3 - num 4) is odd integer. It should also be positive since, then only the product (num 1 + num 2)*(num 3 - num 4) will be positive.

Now we know (num 1 + num 2) is odd positive integer. Sum of two integers is odd only if one is even while other is odd.

=> Either num 1 is even and num 2 is odd or vice versa.

Now, if num 1 is even, it can be selected in 17 ways (since, there are 18 odd numbers and 17 even numbers from 1 to 35)

Then, num 2 can be selected in 18 ways.

Hence total ways of selecting = 17 x 18

Also if num 2 is even and num 1 is odd, total ways of selecting = 18 x 17

=> Total ways of selecting (num 1 + num 2) = 2 x 17 x 18 = 612

Now, (num 3 - num 4) is odd positive integer. Difference of two integers is odd positive only and only if one is even and other is odd and the first number is greater than the second one.

=> Now suppose num 3 is 35. Then num 4 can take values 34, 32, 30.......2. i.e. total 17 ways.

When num 3 is 34, then num 4 can take values 33, 31, 29,......1. i.e. total 17 ways.

When num 3 is 33, then num 4 can take values 32, 30, 28.........,2. i.e. total 16 ways.

When num 3 is 32, then num 4 can take values 31, 29, 27,.........1. i.e. total 16 ways

Similarly the number of ways for each is taken

Total number of ways = 17 x 2 + 16 x 2 + 15 x 2 +................+ 1 x 2

= 2 x ( 17 + 16 + 15 +....+1) =

= 2 x 153 = 306 ways

Hence, (num 3 - num 4) can be selected in 306 ways.

Finally , (num 1 + num 2)*(num 3 - num 4) can be selected in a total of 612 x 306 = 187,272 ways

Plz like it....,

Add a comment
Know the answer?
Add Answer to:
Consider the mathematical expression (num1 + num2) × (num3 − num4). We have been asked to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Use assembly language to write a complete program that will input values fornum1 ,num2 and num3...

    Use assembly language to write a complete program that will input values fornum1 ,num2 and num3 and display the value of the expression ( (num1 ^ 3) * num2 + 5 * ( num2 ^ 2) ) / num3. assume that the user enters only numbers that are greater than zero and the calculation never exceed 4 bytes size. Sample run: num1 = 1 num2 = 2 num3 = 3 ((num1 ^ 3) * num2 + 5 * ( num2...

  • java question, my questions are in the following codes with comments, just answer next or under...

    java question, my questions are in the following codes with comments, just answer next or under it thanks! theres only few, so no worry. import java.security.SecureRandom; public class clsTestRand {    public static void main(String[] args) {        // TODO Auto-generated method stub        //int num1, num2, num3, num4, num5, num6;        int num1 = 0;        int num2 = 0;        int num3 = 0;        int num4 = 0;        int...

  • I couldn't find where to comment. But it has to be written in C++!!!!! Task-1: Rational...

    I couldn't find where to comment. But it has to be written in C++!!!!! Task-1: Rational fractions are of the form a / b, in which a and b are integers and ! ≠ 0. In this exercise, by ‘‘fractions’’ we mean rational fractions. Suppose a / b and c / d are fractions. Arithmetic operations and relational operations on fractions are defined by the following rules: Arithmetic Operations: a/b + c/d = (ad + bc)/bd a/b – c/d =...

  • 17. Prime Numbers A prime number is a number that is only evenly divisible by itself...

    17. Prime Numbers A prime number is a number that is only evenly divisible by itself and 1. For example, the number 5 is prime because it can only be evenly divided by 1 and S. The number 6, how- ever, is not prime because it can be divided evenly by 1, 2, 3, and 6. Write a Boolean function named is_prime which takes an integer as an argument and returns true if the argument is a prime number, or...

  • We have been given the history of shipping costs below. You have been asked to calculate...

    We have been given the history of shipping costs below. You have been asked to calculate a linear trend line for this data. W hat is the intermediate solution for the value of b? (Your answer should be an integer) Week Costs week 1. 497430 week 2. 500072 week 3. 535584 week 4. 514058

  • Arrange the steps in the correct order to solve the system of congruences x 2 (mod...

    Arrange the steps in the correct order to solve the system of congruences x 2 (mod 3), x 1 mod 4). and x3 (mod 5) using the method of back substitution Rank the options below Thus, x= 31.2 - 3/4 + 1)2 - 120+5 We substitute this into the third congruence to obtain 12.5 13 mod 5), which implesu li imod 5) Hence, w5v4 and so x 12.5 - 12/5 + 4) - 5 - 60v. 53, where vis an...

  • We as humans write math expression in infix notation, e.g. 5 + 2 (the operators are...

    We as humans write math expression in infix notation, e.g. 5 + 2 (the operators are written in-between the operands). In a computer’s language, however, it is preferred to have the operators on the right side of the operands, i.e. 5 2 +. For more complex expressions that include parenthesis and multiple operators, a compiler has to convert the expression into postfix first and then evaluate the resulting postfix. Write a program that takes an “infix” expression as input, uses...

  • A mathematical conjecture states that if we start with any positive number we can get to the value 1 by repeating 2 poss...

    A mathematical conjecture states that if we start with any positive number we can get to the value 1 by repeating 2 possible steps depending on the value of the current number. If the current value is even we divide the number by 2 and reapply the steps again (number / 2). If the number is odd we multiply the current number by 3 and add 1 to it and reply the previous steps again (number * 3 + 1)....

  • 1) What is the correct mathematical expression for the reaction quotient, Qc, for the following reaction:...

    1) What is the correct mathematical expression for the reaction quotient, Qc, for the following reaction: CH(E) + 2O2(g) = CO2(g) + 2H20 (1) [CH][02] [CO2][H2012 [CH][02] [CO2] L = LIQUID (CO2) [CH][0212 (d) 1C02) P2012 [CH][02] e) None of the above. 2) A change of pressure has no effect on which of the following reactions at equilibrium? 1) 2502(g) + O2(g) = 2503(8) 2) 4NH3(g) +502(g) = 4NO(g) + 6H2O(g) 3) CH2(g) + Cl2(g) = CH2Cl(g) + HCl(g) 4)...

  • You are to write a program name expressionTree.java that evaluates an infix expression entered by the...

    You are to write a program name expressionTree.java that evaluates an infix expression entered by the user. The expression may contain the following tokens: (1) Integer constants (a series of decimal digits). (2)   One alphabetic character - "x" (representing a value to be supplied later). (3)   Binary operators (+, -, *, / and % (modulo)). (4)   Parentheses          You will parse the input expression creating an expression tree with the tokens, then use the postOrder tree traversal algorithm to extract...

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