Dr. Watson has been kidnaped! Sherlock Holmes was contacted by the kidnapper for ransom. Moments later he received a message from Dr. Watson's phone. The message contained three random strings. Sherlock being Sherlock, was able to deduce immediately that Dr. Watson was trying to give a hint about his location. He figured out that the longest common subsequence between the 3 words is the location. But since it was too easy for him, he got bored and asked you to find out what the actual location is. Your task is to find the longest common subsequence from the 3 given strings before it is too late. A subsequence is a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaining elements. For instance, given a sequence "drew"; "d", "w", "de", "drw", "drew" are all examples of valid subsequences (there are also others), while "er", "wdre" are not. Design a dynamic programming algorithm which takes three input sequences X, Y, and Z, of lengths m, n, and p, respectively, and returns their longest common subsequence. For full marks your algorithm should run in (mnp) time. Note that W is a common subsequence of X, Y, and Z if and only if W is a subsequence of X, W is a subsequence of Y, and W is a subsequence of Z.

Required:
Describe the set of subproblems that your dynamic programming algorithm will consider.

Answers

Answer 1

Answer:

please mark me brainlist

Explanation:

This algorithm works for n number of strings in python3

Input:

83217

8213897

683147

Output:

837

from itertools import product

import pdb

import numpy as np

def neigh(index):

N = len(index)

for ri in product((0, -1), repeat=N):

if not all(i == 0 for i in ri):

yield tuple(i + i_rel for i, i_rel in zip(index, ri))

def longestCommonSubSequenceOfN(sqs):

numberOfSequences = len(sqs); # to know number of sequences

lengths = np.array([len(sequence) for sequence in sqs]); # to know length of each sequences placed in # array

incrLengths = lengths + 1; # here we are taking no .of sequences +1

lengths = tuple(lengths); # making lengths into tuple to make it mutable

inverseDistances = np.zeros(incrLengths);

ranges = [tuple(range(1, length+1)) for length in lengths[::-1]]; # finding ranges from 1 to each lengths

for tupleIndex in product(*ranges):

tupleIndex = tupleIndex[::-1];

neighborIndexes = list(neigh(tupleIndex)); # finding neighbours for each tupled index value and # store them in list

operationsWithMisMatch = np.array([]); # creating array which are miss matched

 

for neighborIndex in neighborIndexes:

operationsWithMisMatch = np.append(operationsWithMisMatch, inverseDistances[neighborIndex]);

#appending newly created array with operations miss match and inverseDistances

operationsWithMatch = np.copy(operationsWithMisMatch);

# copying newly generated missmatch indexs

operationsWithMatch[-1] = operationsWithMatch[-1] + 1;

# incrementing last indexed value

chars = [sqs[i][neighborIndexes[-1][i]] for i in range(numberOfSequences)];

# finding a string(chars) with neighbour indexes and checking with other sequences

if(all(elem == chars[0] for elem in chars)):

inverseDistances[tupleIndex] = max(operationsWithMatch);

else:

inverseDistances[tupleIndex] = max(operationsWithMisMatch);

 

subString = ""; # resulted string

mainTupleIndex = lengths; # copying lengths list to mainTupleIndex

while(all(ind > 0 for ind in mainTupleIndex)):

neighborsIndexes = list(neigh(mainTupleIndex));

#generating neighbour indexes with main tuple index in form of list

anyOperation = False;

for tupleIndex in neighborsIndexes:

current = inverseDistances[mainTupleIndex];

if(current == inverseDistances[tupleIndex]): # comparing indexes in main tuple index and inverse #distance tuple index

mainTupleIndex = tupleIndex;

anyOperation = True;

break;

if(not anyOperation): # if anyoperation is False then we are generating sunString

subString += str(sqs[0][mainTupleIndex[0] - 1]);

mainTupleIndex = neighborsIndexes[-1];

return subString[::-1]; # reversing resulted string

sequences = ["83217", "8213897", "683147"]

print(longestCommonSubSequenceOfN(sequences)); #837


Related Questions

A business should choose the platform as a service (PaaS) cloud model when: a. it designs its own applications but doesn't customize the operating system b. it doesn't need any operating system c. it doesn't design its own applications and doesn't customize the operating system d. it designs its own applications and customizes the operating system e. it doesn't design its own applications but customizes the operating syste

Answers

Answer:

a. it designs its own applications but doesn't customize the operating system.

Explanation:

Cloud computing can be defined as a type of computing that requires shared computing resources such as cloud storage (data storage), servers, computer power, and software over the internet rather than local servers and hard drives.

Generally, cloud computing offers individuals and businesses a fast, effective and efficient way of providing services.

Cloud computing comprises of three (3) service models and these are;

1. Infrastructure as a Service (IaaS).

2. Software as a Service (SaaS).

3. Platform as a Service (PaaS).

Platform as a Service (PaaS) refers to a type of cloud computing model in which a service provider makes available a platform that allow users (software developers) to build code (develop), run, store information in a database and manage applications over the internet.

The main purpose of a Platform as a Service (PaaS) is to provide an enabling environment for software developers to code without having to build and maintain complex infrastructure needed for the development, storage and launching of their software applications.

Simply stated, PaaS makes provision for all of the software and hardware tools required for all the stages associated with application development over the internet (web browser).

Some of the advantages of Platform as a Service (PaaS) is that, it avails software developers with enough convenience as well as simplicity, service availability, ease of licensing and reduced costs for the development of software applications.

Basically, platform as a Service (PaaS) providers (vendors) usually provide their clients (software developers) with server and data storage, operating system, data center, networking resources, etc., while the software developers design, deploy and manage their software applications.

Hence, a business should choose the platform as a service (PaaS) cloud model when it designs its own applications but doesn't customize the operating system.

Read the argument below and determine the underlying principle that was used to come to the conclusion presented: It is recommended that your diet should include at least 3-5 servings of vegetables a day. A serving of vegetables can be 1 cup of raw leafy greens, 1/2 cup of other cooked or raw vegetables, or 3/4 cup of vegetable juice. A diet that has less than 3-5 servings of vegetables a day may lead to health problems. Which other argument uses the same underlying principle as the argument above?

a. Driving a car can be dangerous, but if you learn how to properly drive a car then you can significantly reduce the risk involved,
b. Driving a car can be dangerous, therefore it's recommended that people not drive.
c. Driving a car can be dangerous and that is why states require that drivers pass a test to be licensed to drive.

Answers

Answer:

Hence option a is the correct one. Driving a car can be dangerous, but if you learn how to properly drive a car then you can significantly reduce the risk involved,

Explanation:

a) Driving a car can be dangerous, but if you learn how to properly drive a car then you can significantly reduce the risk involved.

As it belongs How to be a good car driving without risk as equivalent diet concept as a base.

Less than 3-5 servings of vegetables a day not taken equivalent car driving dangerous if no proper driving.

Hence option 1 is valid.

b) is wrong as it has negative feedback regarding the base case.

c) is a suggestion for the strong part which is also the wrong option

write a function copy(s, n) that takes as inputs a string s and an integer n, and that uses recursion to create and return a string in which n copies of s have been concatenated together. python

Answers

Answer:

Following are the method to the given question:

def copy(s, n):#defining a method copy that takes two parameters

   if n <= 0:#definig if to compare n value is less than equal to 0

       return ''#return space  

   else:#definig else block  

       return s + copy(s, n-1)#use recursive method that return value

print(copy("by",2))#calling method and print value

print(copy("ta",2))#calling method and print value

print(copy("good by ",2))#calling method and print value

Output:

byby

tata

good by good by

Explanation:

In this code, a method "copy" is declared that takes two parameters that are "s and n" inside the method a conditional statement is used which can be defined as follows.

In the if block is used "n" variable that checks n value which is less than equal to 0 if it is true it will return a space value.

In the else block it use the recursive method that returns a value which is a copy of s that is concatenated together.

design a relational database in EER for bike helmets and their reviews. a bike helmet has a name and color attributes. a bike company has its name (primary key) and location attributes

Answers

Answer:something you gotta do on your own

Explanation:

EER diagrams are essentially an expanded form of entity-relationship (ER) diagrams. EER models are useful tools for creating high-level model databases. By carefully examining the qualities and limitations, you may plan databases more thoroughly thanks to their improved features.

What design a relational database in EER?

Set up a relationship table. Include the main keys of all involved Entities in the table as fields with the appropriate data types. Add each attribute as a table field if the relationship has any. Establish a primary key by combining the primary keys of all involved entities.

The modeling interface in MySQL Workbench is absolutely dependent on Enhanced Entity-Relationship (EER) diagrams. The relationships between the tables in your model are depicted visually in EER diagrams.

Therefore, The related diagram displays modifications performed using the Model Editor.

Learn more about relational database here:

https://brainly.com/question/13262352

#SPJ2

Create a class named Employee. The class must contain member variables for the employee name and salary. It should contain getter methods for returning the name and salary. It should also contain setter methods for storing the name and salary. The class must include a constructor method for setting both the name and the salary. In addition, it should contain a toString() method.2- Create the client code to test the class Employee.

Answers

Answer:

Explanation:

The following code was written in Java. The code contains the Employee class which contains the two variables (name, salary), the constructor, getter and setter methods for both variables, and an overwritten toString method. It also contains a tester class with the main method inside and creates a Employee object and initializes it. Then it calls the toString method. The output can be seen in the attached image below. Due to technical difficulties I have added the code as a txt file below.

What does the AVERAGE function calculate? the total sum of a list of values the arithmetic mean of a list of values the total number of values in a list the percentage of values in a list

Answers

Answer:

B) the arithmetic mean of a list of values

Explanation:

on Edge

The Average function calculates the arithmetic mean of a list of values. Therefore, option B is the correct option.

What is the average?

In its most general definition, an average can be considered as the representative number or figure from the whole list. The average of a list containing multiple values is obtained by adding all the values and dividing them up by the total number of values.

The ultimate objective of calculating the average is to discover the value that represents the whole list. Average is also known as mean, and it works as a central value in the list, which is comprehensive in nature. It works as an approximate or rough estimate, which helps us in making decisions in daily life.

Thus, the average function calculates the arithmetic mean of a list of values. Therefore, option B is the correct option.

To learn more about the average, visit the link below:

https://brainly.com/question/11265533

#SPJ2

You are hired as an IT consultant for the government owned mobile operating company, Teletalk. Based on the following scenario, make a report for the decision makers to resolve the stated problems.
Despite aggressive campaigns to attract customers with lower call rates and internet packages, Teletalk has been losing a large number of its subscribers (users). Management wants to know why so many customers are leaving Teletalk and what can be done to attract them back. Are customers deserting because of poor customer service, uneven network coverage, wireless service charges, or competition from other mobile operators with extra services (GP/BL)? How can the company use information systems to help find the answer? What management decision could be made using information from these systems? What competitive strategy Teletalk can develop using information systems and how?

Answers

Answer:

An IT consulting report may be a transcript created via an IT professional that addresses all the possible aspects of an enterprise or a corporation. It is often an aggressive analysis report, Project reputation report, Business Plan report, or a Supply Chain Model file

Let's see how to write this kind of report

(1) Introduction.

(2) Point out the problems.

(3) Addressing the problems.

(4) business model and competitive analysis.

(5) Conclusion.

Explanation:

Teletalk may be a government telecommunication company. it's been going out of the marketplace for quite a little bit of time and is thanks to a scarcity of human resources and innovative applications within the field.

The company uses outdated Customer Management Systems (CMS) now so as to research potential customers and gather information about them. they need to be battling retaining customers after a brief period of your time. Their customer service isn't fair and therefore the customers aren't satisfied with the service provided by the corporate.

In order to function well, they need to implement enterprise resource planning ( ERP) data systems.

A data system is everything starting from Human resources to hardware and software. they will be applied everywhere from Customer Retainment and Engagement they're termed as Customer Management Systems and if it's wont to Business Model of any organization then it's referred to as Enterprise Resource Planning Systems (ERP).

By incorporating information systems in teletalk there is often a performance improvement in Sales, Management, Technology, and D-S (Demand-Supply Model).

All these are going to be an excellent advantage to teletalk so teletalk should anticipate innovating the present system with a more reliable and efficient one

rules used in naming variables in object oriented programming​

Answers

Answer:

Explanation: Name your variables based on the terms of the subject area, so that the variable name clearly describes its purpose.

Rosa has received reports by several users that one of the Linux servers is no longer accessible. She is able to remote into the server using a management IP address separate from the one that users would be directed to via a DNS lookup. Which commands, once connected to the server, should she use to start troubleshooting the issue?

Answers

Answer: hello options related to your question is missing attached below are the missing options

answer

ping ( b )

Explanation:

The command she should use once she is connected to the server, should be ping command (127.0.0.1) .

This is because this command is used to check if the network is working appropriately and also to test client and server connection on the network.

Can a result that contains road maps for European countries have a highly meets rating

Answers

Đápán3e

Explanation:

(4 marks)
(d) Outline the steps involved in inserting a picture from a file in a word processing document using
copy and past

Answers

Answer:

HELLO IAM LOKESH IAM NEW PLEASE SUPPORT ME

What are the trinity of the computer system

Answers

Answer:

he Computer, the System, and the World. Simics is a great product for simulating computer systems that contain processors and execute code.

Explanation:

he Computer, the System, and the World. Simics is a great product for simulating computer systems that contain processors and execute code.

Learning Task 3: Write the safety requirement indicated in each number on a
separate sheet of paper​

Answers

Answer:

Please find the complete question in the attached file.

Explanation:

Recall that its SIS consists of one or even more Safety - management Functions (SIFs), which can include a mixture of the device(s), logic when and), and a complete component (elements), along with all user interface as well as power sources, such that two sets of criteria are delineated for each SIF by SRS: the System Requirement Set as well as the Integrate Requisites Set.

They have outlined their technical needs and have sent some of the documentation along with the potential provider's SLAs and terms of service to the legal department to review. Which of the following might be a concern expressed by the legal department after reviewing these documents?

a. Ensuring data is hosted in the appropriate regions for the cloud service provider
b. Ensuring that the corporation has a way to measure uptime to ensure SLAs are actually met *J#
c. Ensuring that there is a guarantee that the cloud service provider will provide notice in the event that they decide to discontinue operations
d. Ensuring that the cloud service provider will allow an audit of their network for security purposes

Answers

Answer:

A concern that might be expressed by the legal department after reviewing the SLAs and terms of service is:

c. Ensuring that there is a guarantee that the cloud service provider will provide notice in the event that they decide to discontinue operations.

Explanation:

The SLA that the legal department will review should include a description of the services to be provided, expected service levels, measurement metrics for each service, each party's duties and responsibilities, and the contract remedies or penalties for breach, among others.  But the legal department will be mostly concerned with legal remedies during breaches, liability limitation and warranties, and intellectual property protection issues than with more technical issues.  This is despite the fact that all the terms of the SLA will be diligently reviewed by the legal department.

Which phrase best complete the diagram

Globalization —-> ?

Answers

Answer:

1. Natural resources move from poor to rich countries

2. increases awareness of events in faraway parts of the world.

Answer:

More unequal distribution of natural resources

Explanation:

A P E X

The Burger Doodle restaurant chain purchases ingredients from four different food suppliers. The

company wants to construct a new central distribution center to process and package the ingredients it uses in its menu items before shipping them to their various restaurants. The suppliers

transport the food items in 40-foot tractor-trailer trucks. The coordinates of the four suppliers and the annual number of truckloads that will be transported to the distribution center are as follows:

Coordinates

Supplier x y Annual Truckloads

A 200 200 65

B 100 500 120

C 250 600 90

D 500 300 75

Determine the set of coordinates for the new distribution center that will minimize the total miles traveled from the suppliers

Answers

Answer :

Given Information:

Site 1: x1 = 360 , y1 = 180

Site 2: x2 = 420 , y2 = 450

Site 3: x3 = 250 , y3 = 400

Solution:

Xa = 200, Ya = 200, Wa = 75

Xb = 100, Yb = 500, Wb = 105

Xc = 250, Yc = 600, Wc = 135

Xd = 500, Yd = 300, Wd = 60

If centre of gravity is (x,y)

then x = (200*75+100*105+250*135+500*60)/(75+105+135+60)        

x = 238

then y = (200*75+500*105+600*135+300*60)/(75+105+135+60)        

 y = 444

Using centre-of-gravity method, location of distribution centre = (238,444) Using rectilinear distance,

Load distance score of Site 1: 75*(abs(360-200)+abs(180-200))+105*(abs(360-100)+abs(180-500))+135*(abs(360-250)+abs(180-600))+60*(abs(360-500)+abs(180-300)) = 161550

Load distance score of Site 2: 75*(abs(420-200)+abs(450-200))+105*(abs(420-100)+abs(450-500))+135*(abs(420-250)+abs(450-600))+60*(abs(420-500)+abs(450-300)) = 131100

Load distance score of Site 3: 75*(abs(250-200)+abs(400-200))+105*(abs(250-100)+abs(400-500))+135*(abs(250-250)+abs(400-600))+60*(abs(250-500)+abs(400-300)) = 93000

Site 3 tends to be optimal as it offers a lower distance ranking.

I HOPE THIS IS RIGHT AND IT HELPS !!!!!

The coordinates of the new distribution center that will minimize the total miles traveled from the suppliers are (178.171, 483.181).

What does this location do?

This location minimizes the total distance traveled by 68,171.951 miles. The suppliers will travel the following distances to the new distribution center:

Supplier A: 284.021 milesSupplier B: 79.959 milesSupplier C: 137.136 milesSupplier D: 370.310 miles

The coordinates were determined using a linear programming model that minimizes the total distance traveled by the suppliers. The model takes into account the coordinates of the suppliers and the annual number of truckloads that will be transported to the distribution center.

Read more about coordinates here:

https://brainly.com/question/31293074
#SPJ2

What should businesses do in order to remain competitive under the current Cloud
landscape?

Answers

Answer:

Cloud Landscape

They must evangelize the benefits of cloud computing to company executives in order to assist them in developing and extracting business benefits that will give them a competitive advantage and increase profits

Explanation:

The most successful organisations carefully plan out a multiyear effort to improve their cloud adoption, focusing on multiple streams of work across several stages of maturity.

Cloud computing governance is difficult even when only one cloud provider is involved, and it becomes even more difficult as organisations move toward multi cloud.

Continuous workload placement analysis involves reassessing workloads at a regular cadence, evaluating whether the current execution venue sufficiently meets the organization’s needs and if migrating to an alternative model provides higher value without adding significant risk to the organization’s operations

They must evangelize the benefits of cloud computing to company executives in order to assist them in developing and extracting business benefits that will give them a competitive advantage and increase profits.

In this question, the response is "Cloud Landscape" which can be defined as follows:

The organizations should adopt these new technologies to benefit from the digital transformation offered by the cloud.New enterprises were embracing cloud computing management strategies, placing established companies at risk.In the multi-year efforts for improving cloud security were meticulously planned by even the most successful enterprises. In several contributing to higher at various maturity levels are addressed.The multi-cloud plan enables governance of cloud computing increasingly challenging, even and there is only one cloud service provider involved in the agreement.  

Learn more:

cloud computing: brainly.com/question/16026308

A company wants to provide wireless access for guests with their Aruba solution. Which configuration feature requires the customer to purchase PEFNG licenses

Answers

Answer: addition of custom rules to control access for authenticated guests.

Explanation:

PEFNG license helps in the provision of identity-based security for both the wired and the wireless users.

Since the company wants to provide wireless access for guests with their Aruba solution, the configuration feature that requires the customer to purchase PEFNG licenses is the addition of custom rules to control access for authenticated guests.

To use AutoSum with a row of four values, where must your cursor be to have the sum appear in the row if you have not highlighted the cells?

Answers

Answer:

on the first empty cell to the right of the last cell containing a value.

Explanation:

The AutoSum function in excel gives a shortcut path to taking the sum of numeric values in a row or column of data. The Autosum uses the sum function to take the addition of all the desired rows or columns values without needing to make a manual highlight of the data. To use AutoSum with a row of 4 values, the cursor must be placed immediately at the cell next 4th row cell containing a value. This is equivalent to the first empty cell to the right of the last cell containing a value, then autosum is clicked in the home tab and all 4 cells will be highlighted as it uses the sum function to calculate the sun of the 4 row values.

The Autosum Excel function could be made accessible with ALT+ the = sign, and the formula is automatically created to add a continuous range of all numbers.

The AutoSum function in Excel provides a shortcut to the sum of numerical values in a data line or column. To add all the desired lines or column values the Autosum uses the total function without having to make a manual highlight. The cursor must immediately be placed in the fourth cell next row containing a value to use AutoSum with a round of 4 values. The first empty cell to the right of the latter cell with a value is equal to that of the auto-sum, then the domestic tab clicks on auto-sum, and the sum function is used to calculate the sun of the four-row values to highlight all 4 cells.

Therefore, the final answer is "on the first empty cell to the right side of the last cell with value".

Learn more:

brainly.com/question/11507998

A small e-commerce company uses a series of Robotic Process Automation solutions to manage the backup of data from individual workstations to an on-premise server. However, the company is opening another office and would like to more easily share data between locations, along with better protecting the data from loss.
Which technology could be combined with their current automated processes to do this?

Answers

Answer:

Cloud.

Explanation:

Cloud computing can be defined as a form of data computing which requires the use of shared computing resources such as cloud storage (data storage), servers, computer power, and software over the internet rather than local servers and hard drives.

Generally, cloud computing offer individuals and businesses a fast, secured, effective and efficient way of providing services over the internet.

Basically, cloud computing comprises three (3) service models and these include;

1. Platform as a Service (PaaS).

2. Software as a Service (SaaS).

3. Infrastructure as a Service (IaaS).

Additionally, the two (2) main characteristics of cloud computing are;

I. Measured service: it allows cloud service providers to monitor and measure the level of service used by various clients with respect to subscriptions.

II. Resource pooling: this allows cloud service providers to serve multiple customers or clients with services that are scalable and provisional.

For example, the provisioning of On-demand computing resources such as storage, network, virtual machines (VMs), etc., so as to enable the end users install various software applications, database and servers.

Hence, the technology that could be combined by the small e-commerce company with its current automated processes is cloud storage.

There are different tools used in data sharing. The technology that could be combined with their current automated processes to do this is blockchain.

Blockchain is known to use different kinds of distributed ledger that is often shared across networked devices. Through this, people on the network can share files and values securely and even on a peer-to-peer basis. This is no need any middlemen.

Data protected in blockchain is very vital.  All records on a blockchain are known too be secured through the act of cryptography. Here, Network people do have their own private keys that are given to them for any  transactions they make.

Learn more about Blockchain from

https://brainly.com/question/25700270

how do you get The special ending in final fight 2 for super nintendo

Answers

it is really interesting on.....................

Daniella is configuring a Wi-Fi network in a restaurant for access by staff and customers. How far does WiFi, the broadband wireless technology that allows computers and other devices to communicate over a wireless signal typically travel indoors in the form of radio waves?
a. 1000 feet
b. 300 feet
c. 120 feet
d. 500 feet

Answers

Answer:

c. 120 feet

Explanation:

WiFi can be defined as a wireless local area network that allows network devices such as access points (APs), computers (both laptops and desktops), smartphones, smart televisions, etc., to communicate with each other wirelessly over a short-ranged network. It is a standard communication network that uses radio waves to establish a channel (medium) between multiple network devices.

This ultimately implies that, the network range or distance covered by WiFi is largely dependent on transmission power and frequency. The standard range or distance covered by WiFi is about 50 meters (160 feet).

Hence, a WiFi traveling indoors in the form of radio waves and operating on the 2.4 GHz band would cover up to a distance of 150 feet. Also, a WiFi can reach or travel up to 300 feet outdoors.

In this scenario, the WiFi network Daniella is configuring in a restaurant for access by staff and customers can go as far as 120 feet indoors.

Define a function named LargestNumber that takes three integers as parameters and returns the largest integer. Define a second function named SmallestNumber that takes three integers as parameters and returns the smallest integer. Then, write a main program that reads three integers as inputs, calls functions LargestNumber() and SmallestNumber() with the inputs as arguments, and outputs the largest and the smallest of the three input values. CORAL

Answers

Answer:

Explanation:

The following code is written in Java and creates both of the requested methods. The methods compare the three inputs and goes saving the largest and smallest values in a separate variable which is returned at the end of the method. The main method asks the user for three inputs and calls both the LargestNumber and SmallestNumber methods. The output can be seen in the attached image below.

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter number 1: ");

       int num1 = in.nextInt();

       System.out.println("Enter number 2: ");

       int num2 = in.nextInt();

       System.out.println("Enter number 3: ");

       int num3 = in.nextInt();

       System.out.println("Largest Value: " + LargestNumber(num1, num2, num3));

       System.out.println("Smallest Value: " + SmallestNumber(num1, num2, num3));

   }

   public static int LargestNumber(int num1, int num2, int num3) {

       int max = num1;

       if (num2 > num1) {

           max = num2;

       }

       if (num3 > max) {

           max = num3;

       }

       return max;

   }

   public static int SmallestNumber(int num1, int num2, int num3) {

       int smallest = num1;

       if (num2 < num1) {

           smallest = num2;

       }

       if (num3 < smallest) {

           smallest = num3;

       }

       return smallest;

   }

}

The algorithm consists in a main routine that calls two functions based on if-cycles to determine the minimum and the maximum of a set of three integers, whose construction can revised below.

In this question we must define a main algorithm in which three integers are introduced and functions LargestNumber() and SmallestNumber() are called and outputs are printed:

INPUTS

Integers num1, num2, num3;

OUTPUTS

Integers min, max;

MAIN ALGORITHM

Print "Write the first integer";

Write num1;

Print "Write the second integer";

Write num2;

Print "Write the third integer";

Write num3;

min = SmallestNumber(num1, num2, num3);

max = LargestNumber(num1, num2, num3);

Print "The smallest of the three input values is " min;

Print "The largest of the three input values is " max;

FUNCTION SmallestNumber()

if (((num1 <= num2) and (num2 <= num3)) or ((num1 <= num3) and (num3 <= num2))) then:

     min = num1;

else if (((num2 <= num1) and (num1 <= num3)) or ((num2 <= num3) and (num3 <= num1))) then:

    min = num2;

else:

    min = num3;

return min;

FUNCTION LargestNumber()

if (((num1 >= num2) and (num2 >= num3)) or ((num1 >= num3) and (num3 >= num2))) then:

     max = num1;

else if (((num2 >= num1) and (num1 >= num3)) or ((num2 >= num3) and (num3 >= num1))) then:

    max = num2;

else:

    max = num3;

return max;

To learn more on algorithms, we kindly invite to check this verified question: https://brainly.com/question/22952967

What notation requires parentheses in order to correctly define the order of computation? Group of answer choices prefix notation infix notation postfix notation all of the above

Answers

Answer:

The correct answer is Option B (infix notation).

Explanation:

The conventional format of logical as well as mathematical formulas where operators write the precise manner of infix amongst variables or the inputs is considered as Infix notation.Computer systems cannot easily be scanned like prefix and post-fix kind of notation, nevertheless owing to its convenience it has been used throughout numerous computer programs.

All other given options aren't related to the given scenario. So the above is the correct one.

In the revised version of the library system with Book and Periodical, Question 16 options: a) Book is a subclass of Periodical b) Periodical is a subclass of Book c) Book and Periodical are subclasses of LoanableItem d) Book and Periodical implement LoanableItem

Answers

Answer:

c. Book and Periodical are subclasses of LoanableItem

Explanation:

Books are kept in library in a periodical manner. Both classes are not superior, they are subclasses of LoanableItem. Library uses common guide which makes it easy to find a book.

Fictional Corp makes use of ITIL processes and lifecycle management strategies to ensure that they have a good handle on the various stages of creating new applications and retiring them once they are no longer useful. Jason has been tasked with creating a new application to be deployed onto the company's private cloud. Which of the following is the first stage of the process?

a. Deployment
b. Design and development
c. Migration
d. Upgrade

Answers

Answer: Design and development

Explanation:

Since Jason has been tasked with creating a new application to be deployed onto the company's private cloud, the first stage of the process is the design and development.

The design and development stage involves gathering of business functions as well as analysing requirements before the application is deployed to the private cloud.

When a Select Case statement executes, the value of the test expression is compared with the values that follow each of the _______ keywords.

Answers

Answer:

Case

Explanation:

In Computer programming, a variable can be defined as a placeholder or container for holding a piece of information that can be modified or edited.

Basically, variable stores information which is passed from the location of the method call directly to the method that is called by the program.

For example, they can serve as a model for a function; when used as an input, such as for passing a value to a function and when used as an output, such as for retrieving a value from the same function. Therefore, when you create variables in a function, you can can set the values for their parameters.

A Select Case statement can be defined as a conditional statement that avails software developers or programmers the ability to test a variable by comparing it with a list of values.

In a Select Case statement, each variable is referred to as a Case.

Generally, when a Select Case statement executes, the value of the test expression is compared with the values that follow each of the Case keywords.

A Soundex code is a four-character string in the form of an initial letter followed by three digits.

a. True
b. False

Answers

Answer:

a. True

Explanation:

A Soundex code is an algorithm used in compiling English names. It allows words that sound alike to be grouped in the same category. It begins with the first letter of the word followed by three digits. Census boards like the United States Census Bureau have used the Soundex code to find names with similar sounds.

The Soundex code was created by Robert C. Pittsburgh and this hashing system only works with the 26 English letters.

Write a program that asks the user for the name of their dog, and then generates a fake DNA background report on the pet dog. It should assign a random percentage to 5 dog breeds (that should add up to 100%!)

Answers

Answer:

Code:

import java.util.*;

public class Main{

public static void main(String []args){

 

Scanner sc = new Scanner(System.in);

System.out.println("What is your dog's name?");

// Entering name of dog

String name = sc.nextLine();

 

System.out.println("Well then, I have this highly reliable report on " + name + "'s prestigious background right here.");

 

System.out.println("\n\nSir " + name + " is\n\n");

 

//Generating random numbers

Random ran = new Random();

int sum = 0;

int a = 0;

int b = 0;

int c = 0;

int d = 0;

int e = 0;

while(sum != 100)

{

a = ran.nextInt(100);

b = ran.nextInt(100-a);

c = ran.nextInt(100-b);  

d = ran.nextInt(100-c);

e = ran.nextInt(100-d);

sum = a + b+ c + d + e;

}

 

System.out.println(a + "% St. Bernard");

System.out.println(b + "% Chihuahua");

System.out.println(c + "% Dramatic RedNosed Asian Pug");

System.out.println(d + "% Common Cur");

System.out.println(e + "% King Doberman");

 

System.out.println("\n\nWow, that's QUITE the dog!");

 

}

}

15) Three primary activities of a program are: A) Variables, Operators, and Key Words B) Lines, Statements, and Punctuation C) Input, Processing, and Output D) Integer, Floating-point and Character E) None of the above​

Answers

Answer:

yes sir

Explanation:

Other Questions
Is Liesel a "thief"? Cite evidence from the novel to justify your answer. Xochitl went to the store to buy some cherries. The price per pound of the cherries is $4 per pound and she has a coupon for $3.50 off the final amount. With the coupon, how much would Xochitl have to pay to buy 3 pounds of cherries? Also, write an expression for the cost to buy pp pounds of cherries, assuming at least one pound is purchased Ayuda plis..5 (2x+3) - 4x= - 4 +3 (x-4) Which section under Dispute Resolution in a CAR Buyer Representation Agreement states that a buyer and broker agree to mediate any dispute or claim arising before using court action or arbitration? The topic= Direct and Inverse Proportions It is given that y is directly proportional to x and y=36 and when x=12(a)An equation connecting to x and y(b) That value of y when x=5(c)The value of x when y=12Please help me answer my hw, thank you! I NEED THE ANSWER SOON PLEASE!!?!?! hopefully someone sees this Can someone help me with this question? Will give brainliest. What is 40 % of 50?????????????????????????????????????/ (a) State two rules and three regulations hello could you please help me with this math problem with full explanation which I am unable to solve? Thanks a lot. Ton cao cp, gii tch.............. A triangle can have at most___ right angle241 XWhich equation could be used to create the data shown in thetable?15O y = 5x417O y = 5x + 1521O y = 4x + 1729O y = x + 4937 Find the slope of the line that passes through the points (-12,10) and (-18,14).PLEASE HELP ASAP The United States has always regarded itself as a beacon of democracy and labeled itself "democracy". However, the reality is that money politics has resulted in a large number of people being excluded from the political process and unable to realize political rights. Money politics deprives the American people of their democratic rights, suppresses the expression of voters' true will, and forms de facto political inequality. Money politics has exposed the false side of American democracy. one is the product of mainly socialization.justify this statement with example what is the relation that represents the relation Ayudaaa :(Calcula la resistencia total del siguiente circuito elctrico. "Human wants are greater than the resources that are available to satisfy them." This implies the need fores )A)working harder.B)asking for less.C)leaving decisions to fate.D)making choices to allocate resources.Fundamenta Click on the graphic to select the figure that would make the following "a reflection in line k."