Scientific applications require finding solutions

Assignment Help Business Management
Reference no: EM132252877

This is the question:

Numerous engineering and scientific applications require finding solutions to a set of equations. Ex: 8x + 7y = 38 and 3x - 5y = -1 have a solution x = 3, y = 2. Given integer coefficients of two linear equations in 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
3 -5 -1

then the output is:

3 2

Use this brute force approach:

xSolution = -99

For every value of x from -10 to 10
   For every value of y from -10 to 10
      Check if the current x and y satisfy both equations. If so, output the solution, and
      assign xSolution with x.

Check if xSolution is still -99. If so, then output "No solution".

Ex: If no solution is found, output:

No solution

The answer can be in Python. I am seriously stuck. No clue. Here's what I have.

integer xSolution

integer x

integer y

xSolution = -99

x = Get next input

y = Get next input

while x >= -10 and x <= 10 

  while y >= -10 and y <= 10

   if 8 * x + 7 * y == 38 and 3 * x - 5 * y == -1

     xSolution = x

if xSolution != -99

  Put xSolution to output

  y = Get next input

elseif xSolution == -99

  Put "No solution" to output

Reference no: EM132252877

Questions Cloud

Write the main details for each paragraph : Write the main details for each paragraph in your own words. Using your outline as reference, write a complete expanded definition in the space provided
What is organizational behaviour : What is Organizational Behaviour (OB)? Compare and contrast independent, dependent, and contingency variables.
Five different internet business models : List and describe at least five different Internet business models. Which of these models do you think would be the most risky for a startup business today
What facts are relevant to your decisions : Do you believe that business has any direct ethical duties to living beings other than humans? Do animals, plants, or ecosystems have rights?
Scientific applications require finding solutions : Numerous engineering and scientific applications require finding solutions to a set of equations. Ex: 8x + 7y = 38 and 3x - 5y
South africa is emerging as profitable production : South Africa is emerging as a profitable production and export base for some of the world’s big auto manufacturers, despite the country’s remoteness,
Team effectiveness model of context-composition and process : Define team effectiveness and explain the Team Effectiveness Model of Context, Composition, and Process
Why did the upgrade to ipv6 occur : Why did the upgrade to IPv6 occur? and When do you think all networks will have to be IPv6?
Briefly identify a business process used by the company : Briefly identify a business process used by the company that does not match the company's strategy.

Reviews

Write a Review

Business Management Questions & Answers

  Combination of steel and aluminum

Peter owns an auto parts firm. He uses a combination of steel and aluminum to produce her auto parts. All of the following combinations will finish the task on time. Steel costs $15 per unit and the aluminum costs $50 per unit. What combination of..

  What can you do today to set your plans in motion

What can you do today to set your plans in motion. Why must health care providers must grow as professionals? What benefits does give to all interested parties

  Why are some managers powerless

Managers should have plenty of power but some are incapable of getting subordinates to do what they want. Why?

  Calculate the unknown interest rate

a) Linkon invested $1000 in the business. After a period of 10 years the money was $2000. Calculate the unknown interest rate.

  Definition of sustainability and informally

Provide and initial "off the cuff" definition of sustainability and informally assess your organization's level of social responsibility based upon this definition. If you are not currently associated with an organization.

  International trade is a positional trade-off

A source of conflict in international trade is a positional trade-off between trade and a desire to protect residents from potentially harmful products, such as substandard drugs. Briefly outline one way that nations might cooperatively deal with thi..

  Have a nice conflict - interview

Prepare a discussion response about a specific conflict you have experienced with someone else. Although preferred, the conflict does not have to be work-related.

  Identify 5 methods of collecting information

1. How can you assess information that is held by an organisation for accuracy and relevance? 2. Identify 5 methods of collecting information.

  Advantages and disadvantages derived from decision

What was an important decision that you made that had significant effects on your life and what have been the main advantages and disadvantages derived from this decision?

  Rewarding employees for their job statusalmost every

rewarding employees for their job statusalmost every organization rewards people to some extent for their job status.

  What are the advantages and disadvantages of collaboration

What are the advantages and disadvantages of collaboration with these stakeholders for SunCal? For Disney? For What solutions do you believe might emerge from dialogue? in Discussions case A brawl in Mickey's backyard

  Should corleone invest in this wood chipper

Perform an after-tax net present worth analysis if Corleone uses an after-tax MARR of 10%. Should Corleone invest in this wood chipper?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd