Questions
A. Consider the function ?(?)=?3−?−1f(x)=x3−x−1. What is the value of x after the third iteration of...

A. Consider the function ?(?)=?3−?−1f(x)=x3−x−1. What is the value of x after the third iteration of the Secant Method if starting guess values are 1 and 2.

Select one:

a. 1.3372

b. 1.3285

c. 1.3230

d. 1.3229

e. 0.0

B. find the value of x at the third iteration using Newton’s Method. Starting value x=1.

In: Computer Science

A palindromic number is a number that remains the same when its digits are reversed. For...

A palindromic number is a number that remains the same when its digits are reversed. For examples, 1, 11, 99, 121 are palindromic. Write a program that takes one array of 10 positive integers as input and output all the palindromic numbers in this array. We assume that each input number is valid, i.e., a positive integer.

Hint: You can consider the following steps to check whether a number (e.g., 121) is palindromic • Store this number to one variable, e.g., temp = 121. • Calculate the value of the number when all the digits in temp are reversed, e.g., extracting each digit in temp from the right-hand side to left-hand side, and calculating the value at the same time. • Check whether the original value equals to this calculated value.

write it in c++

In: Computer Science

data=[3831,4572,4219,2099,285,2391,3836,2290,410,4690,2031,1778,1468,4031,4513,1709,3603,4146,498,118,2635,3097,689,1340,617,394,3196,3676,4263,4110,2850,885,1926,2225,659,2643,4847,4579,977,2405,918,1256,4194,719,1218,3218,1969,395,156,3091,1860,44,2519,

data=[3831,4572,4219,2099,285,2391,3836,2290,410,4690,2031,1778,1468,4031,4513,1709,3603,4146,498,118,2635,3097,689,1340,617,394,3196,3676,4263,4110,2850,885,1926,2225,659,2643,4847,4579,977,2405,918,1256,4194,719,1218,3218,1969,395,156,3091,1860,44,2519,1763,2938,1246,1384,4034,2008,876,4346,1975,2612,2531,4518,4554,2187,3938,3396,434,4679,1681,2652,371,3884,1681,4636,3420,4880,111,566,2107,1810,4672,1716,303,1102,3777,3635,1485,2301,3127,2487,3058,1171,4240,4108,2990,334,3746,27,651,1299,1125,2475,2760,411,1932,4071,4099,4452,670,3229,2010,997,3274,2182,3072,42,4610,3657,844,1070,2697,322,4059,2255,3140,1162,1856,4111,4007,2599,4246,3508,2093,2597,1686,1014,158,1389,1032,1832,1481,2117,4947,4835,2820,2227,4469,1203,4665,3935,3946,792,1510,4940,3659,193,1603,3690,1531,761,2477,199,830,1920,1060,4717,3585,2830,3635,3205,3941,2677,3709,4544,3415,1222,3101,1010,4810,3052,3427,4702,2707,4488,458,1637,597,2105,1933,1587,231,1638,4713,1893,449,213,3822,1175,990,3349,440,2665,4248,2909,3221,1328,249,2576,4531,908,4302,728,3923,541,1330,4443,4655,2033,4761,4769,1540,48,600,2932,97,3161,2790,2093,2695,2735,3728,4879,2927,325,1244,1070,2056,2162,1367,4503,3924,3691,683,1553,716,4262,4760]

In PYTHON please write a code that implements the counting sort algorithm by making a CountingSort function with an array input. Please make the array input in the form of a list. Then sort 3 randomly generated arrays by writing code, and the data array listed below. Test all 4 arrays and print the output.

Please develop then comment on the growth function of the code, and comment on the big O notation.

In: Computer Science

Create a C++ login program using file for 2 user. Usernames must be in one file...

Create a C++ login program using file for 2 user. Usernames must be in one file and password in the other file. Ask user for their usernames and password if it matches, they logged in successfully. If it doesn’t match,they have 3 trials ,then they have to sign in and create a username and password. After creating a username and password, they have to go to the login page again. Must work for visual studio code

In: Computer Science

It is a C++ introduction exercise and I am a rookie. Please contain detailed reasons and...

It is a C++ introduction exercise and I am a rookie. Please contain detailed reasons and explanations and I would appreciate any help you can provide.

When we pass parameters to functions by value or by reference, we're doing different things; the end result will not necessarily be the same. And, of course, it's wise for us to understand exactly how the results will be different. But another angle we need to consider is why we need to have these two different kinds of parameters, which is to say that we should understand when we would be better off using one technique instead of the other.

1. What are the design benefits of passing a parameter by value? What can you do when you pass by value that you can't do when you pass by reference?

2. What are the design benefits of passing a parameter by reference? What can you do when you pass by reference that you can't do when you pass by value?

3. Suppose you were going to write a function with one parameter, and that the result would be the same whether you passed the parameter by value or by reference — it's not always the case that the outcome will be different. In what circumstances would you expect the pass-by-value version to run faster? In what circumstances would you expect the pass-by-value version to use less memory?

4. Same situation as the previous question. In what circumstances would you expect the pass-by-reference version to run faster? In what circumstances would you expect the pass-by-reference version to use less memory?

Note that these questions are not about how these techniques work, they're about why you would prefer one rather than the other.

In: Computer Science

JAVA Write a program that will compare two names. The program prompts the user to enter...

JAVA

Write a program that will compare two names. The program prompts the user to enter two names for a comparison. If the names are same, the program states that. If the names are different, the program converts both names to UPPERCASE, and compares then again. If they are equal, the programs displays a message stating that names are equal if CASE is ignored. Otherwise, the program prints names with a message that names are not equal.  Check also if there is a way to compare strings while ignoring case (upper or lower)

In: Computer Science

Given a positive integer n, write a recursive algorithm that returns the number of the digits...

Given a positive integer n, write a recursive algorithm that returns the number of the digits in n. For example, if the given number n is 12345, the algorithm should return 5. What is the time complexity of your algorithm? use java

In: Computer Science

Given 2 as a primitive root of 29, construct a table of discrete logarithms, and use...

Given 2 as a primitive root of 29, construct a table of discrete logarithms, and use it to
solve the following congruences.
a. 17x2 K 10 (mod 29)
b. x2 - 4x - 16 K 0 (mod 29)
c. x7 K 17 (mod 29)

In: Computer Science

Use java .Given a stack S and an element x, write a recursive algorithm that returns...

Use java .Given a stack S and an element x, write a recursive algorithm that returns True if x is in S, or False otherwise. Note that your algorithm should not change the content in S. What is the time complexity of your algorithm?

In: Computer Science

I need a flow chart built in raptor and the Java source code in the source...

I need a flow chart built in raptor and the Java source code in the source folder (src)

Please fully document the program: add comments to describe all major parts of the solution. SO that I can understand how and why the code was built that way.

Problem specifications:

-The TSA want you to design and code a program that will be used to screen travelers through AirportX. When a traveler arrives at the airport, he/she is required to go through a checkpoint for COVID-19. The traveler temperature is checked and a recommendation is made for the traveler to be quarantined or not.

A traveler will be quarantined if all of the following conditions are met:

-the temperature read for the traveler is 100.4 or more degrees Fahrenheit.

-the traveler is coughing.

-the traveler is experiencing a shortness of breath.

What need to be collected about a traveler?

Beside collecting all of the above information about a traveler, the first name and last name and passport number of the traveler are collected only if the traveler is to be quarantined.

What to do?

-develop a full solution made up of a short analysis of the problem, a flowchart using Raptor, another flowcharting program, or even by hands, and a full Java program.

In: Computer Science

Give a complete implementation of the queue ADT using a singly linked list that includes a...

Give a complete implementation of the queue ADT using a singly linked list that includes a header sentinel (in Python).

In: Computer Science

(12 pts) Suppose r0 = 0xFFFFFFFF, r1 = 0x00000001, r2 = 0x00000000 Initially N, Z, C,...

(12 pts) Suppose r0 = 0xFFFFFFFF, r1 = 0x00000001, r2 = 0x00000000 Initially N, Z, C, V flags are
zero. Find the value of the N, Z, C, V flags of the following instructions. (Assume each instruction
runs individually, i.e. these instructions are not part of a program.). Hint: This time remember
what the default flag are values for the N, Z, C, V flags. The default flag values might vary based
on the flag type.
• ADD r3, r0, r2
• SUBS r3, r0, r0
• ADDS r3, r0, r2
• LSL r3, r0, #1

4. (12 pts) Suppose r0 = 0x0F0F0F0F, and r1 = 0xFEDCBA98, find the result of the following
operations.
• ORR r3, r1, r0
• AND r3, r1, r0
• BFI r3, r1, #4, #8
• MVN r3, r1
ADD r3, r1, r3

In: Computer Science

write a c++ program in which for loop iterates over all integers in the range 0...

write a c++ program in which for loop iterates over all integers in the range 0 to 99 inclusive and prints out all of those numbers dividible by both 2 and 5.

In: Computer Science

Two scenarios are provided for the candidates. The candidates can provide appropriate solutions for any one...

Two scenarios are provided for the candidates. The candidates can provide appropriate solutions for any one or both the scenarios considering all the points.

Scenario 1:

An environment is attacked by zero-day attack with users identifying a notepad with attacker details and instructions to regain access, 60% of estate/users are impacted. Every endpoint had AV & EDR tools, but the machines were infected. Environment had required security controls for network, firewall, log monitoring, nothing was detected in SIEM. Backup strategy used is snapshot back-up on the same network in the same domain.

Using threat hunting techniques can we establish how hacker could have infiltrate and,

  1. How to find what are the IOC’s.
  2. How do you identify if any data exfiltration has happened?
  3. Approach to restrict further propagation of malicious code in estate & immediate corrective actions.
  4. What will be the incident response and recovery strategy ?

Scenario 2:

When looking at any security team, one thing you might notice is that there is a tool for everything. And we do mean everything: ticketing, threat intelligence, security investigations, malware analysis, detection, incident response, advanced persistent threats, security monitoring the list goes on.

Every organization wants the best of the best to build their defenses. This can often leave their security teams and security operations centers with a tool stack of uncooperative solutions that don’t communicate with one another, with their full value remaining untapped, and they can interrupt or even cancel each other out. The team becomes paralyzed by the sheer number of alerts generated by these solutions, losing time that could be spent on contextualized investigation and response.

We often cite alert fatigue as a common challenge in SOCs, and with good reason. Nobody likes alerts, because whether it’s a fire alarm, car alarm, or alarm for any other kind of emergency, it signals to us that a real threat is present. But after hearing alerts time and time again, all we hear is the boy who cried wolf. We downplay these alerts because we’ve spent so much of our precious time combing through them, only to reveal themselves as fake. In SOC terms, this leads to real threats being missed, often to devastating consequences.

There is a solution. That solution is connecting the tools that security teams run, to communicate with each other and do away with the tedious, time-consuming tasks that have a high potential for human error. Streamlining the process with which tools are used helps to keep security professionals from losing any of their precious time.

  1. What is security orchestration?
  2. What can we use security orchestration for?
  3. What are the benefits of security orchestration?
  4. What are the key elements that are needed for SOAR to perform as desired?
  5. What is Automated response and how does it work, can you give an example?

In: Computer Science

In a one processor system, there is an interrupt clock which is set to a “time...

In a one processor system, there is an interrupt clock which is set to a “time slice Q”, that is, every Q an interrupt occurs to stop the process. There is only one I/O device in the system    which is interrupted when the process needs an I/O. There are 3 processes A, B, C.

    

     Process A executes an I/O interrupt every T units of time.

     Process B executes an I/O interrupt every 2T units of time.

     Process C executes an I/O interrupt every 3T units of time.

(a) Which of the above processes will benefit the most and which is not when Q = T.

      Explain your answer

(b) Which of the above processes will benefit the most and which is not when Q = 2T.

      Explain your answer

(a) Which of the above processes will benefit the most and which is not when Q = 3T.

      Explain your answer

What is the best value should Q takes for good performance ? explain your answer in full.

In: Computer Science