Questions
Randomly generate 0, 1, or 2 in a 100 by 100 2d array. For each entry...

Randomly generate 0, 1, or 2 in a 100 by 100 2d array.
For each entry in the 2d array, count the number of 0’s and 1’s in the surrounding entries.
Save the result in two 2d arrays: one for the number of 0’s, one for the number of 1’s.
For example:
0   0   1
2   1   0
0   0   0

The number of 0’s for a[0][0] is 1; the number of 1’s for a[0][0] is 1;
The number of 0’s for a[0][1] is 2; the number of 1’s for a[0][1] is 2;
The number of 0’s for a[0][2] is 2; the number of 1’s for a[0][2] is 1;
The number of 0’s for a[1][0] is 4; the number of 1’s for a[1][0] is 1;
The number of 0’s for a[1][1] is 6; the number of 1’s for a[1][1] is 1;
The number of 0’s for a[1][2] is 3; the number of 1’s for a[1][2] is 2;
The number of 0’s for a[2][0] is 1; the number of 1’s for a[2][0] is 1;
The number of 0’s for a[2][1] is 3; the number of 1’s for a[2][1] is 1;
The number of 0’s for a[2][2] is 2; the number of 1’s for a[2][2] is 1;

In: Computer Science

3.1 Bratko states that iterative deepening combines the best properties of breadth-first search and depth-first search...

3.1 Bratko states that iterative deepening combines the best properties of breadth-first search and depth-first search and is therefore, in practice, often the best choice
amongst the basic search methods. Discuss this statement.


3.2 Discuss the concept of the ‘locality’ of the effects of actions in the context of planning problems.

In: Computer Science

Declare two 2d arrays n0[MAX_ROW][MAX_COL], n1 [MAX_ROW][MAX_COL]. Then, loop through the 2d array and save the...

Declare two 2d arrays n0[MAX_ROW][MAX_COL], n1 [MAX_ROW][MAX_COL].
Then, loop through the 2d array and save the results in n0 and n1:

for (i=0; i<MAX_ROW; i++)
  for (j=0; j<MAX_COL;j++){
       //calculate number of zeros around entry a[i][j]
       n0[i][j] =
       //calculate number of ones around entry a[i][j]
       n1[i][j] =
  }

Set the MAX_ROW and MAX_COL to a small number and display all three 2d arrays on the screen to verify that the calculations are correct. You may still use command-line inputs as in the example program to set the actual size of the array (must be less than or equal to MAX_ROW, MAX_COL.

In: Computer Science

You are going to begin the process of data gathering. There are three types of data...

You are going to begin the process of data gathering. There are three types of data you will be gathering – Administrative, Technical and Physical. For this assignment, you will be gathering your administrative data. This data will be created by you for your fictitious company. You may use as many resources as you need in order to develop this data. The Internet, data from real companies, and data you just make up on your own may be used. Areas of data that need to be gathered are as follows:

  • Human Resources
    • Recruitment – steps for hiring new employees
    • Employment – policies and procedures employees must follow
    • Termination – steps for terminating employees
  • Organizational Structure
    • Senior Management – how is the senior management structured
    • Security Program – how is this structured. What are the components and policies and procedures
    • Security Operations – what are the policies and procedures and how is this structured
    • Audit – how are these performed and how often
  • Information Control
    • User Accounts – what is the process for creating and managing them
    • User Error – how is this tracked and what happens in the event of user error
    • Asset Control – how are assets protected, assigned value and monitored
    • Sensitive Information – what sensitive information exists, how is it protected and what are the policies and procedures
  • Business Continuity
    • Contingency Planning – do they have it and how is it managed
    • Incident Response Program – do they have it and how is it managed
  • System Security
    • System Controls – what are they and do they need to be improved
    • Application Security – what is in place and is it effective
    • Configuration Management – what do they have in place, what are the policies and procedures and how often is it updated
    • Third Party Access – who has access to any of the assets and how is it controlled

All of the above information will be documented in the risk assessment. In some cases it will be tested and questions to appropriate personnel will be asked.

In: Computer Science

Write C code to approximate Sin(x) and Cos(x) function using Taylor’s series. The angle x is...

Write C code to approximate Sin(x) and Cos(x) function using Taylor’s series. The angle x is expressed in radians. Use the first FIVE terms of Taylor’s series to approximate Sine/Cosine function.

a. Compare your Taylor’s series approximation of Sine/Cosine function with the math.h implementation of sin and cos function.

b. Determine tan(x) from Taylor’s series approximation of Sine/Cosine functions, for x = 0, PI/4, PI/2, PI. Use PI = 3.14159.

In: Computer Science

write a comprehensive research on Architectural styles and frameworks that are used in software development, and...

write a comprehensive research on
Architectural styles and frameworks that are used in software development, and complete the following:


From your research, select an architectural style that is used in a real-world system.


Describe the real-world system and the architectural style.


Justify why this architectural style is well-suited for the selected real-world system.


In: Computer Science

whats data earehouse design? list some pos and cons how we implement dimensional data models in...

whats data earehouse design? list some pos and cons

how we implement dimensional data models in a data base covering relational implementation and multidimesional implementation.

whats the process like of designing the data stucture of a warehouse.

In: Computer Science

Describe different techniques for masquerading as a particular host that uses SSL.

Describe different techniques for masquerading as a particular host that uses SSL.

In: Computer Science

Q.1 Write a python program that will take in basic information from a student, including student...

Q.1 Write a python program that will take in basic information from a student, including student name, degree name, number of credits taken so far, and the total number of credits required in the degree program. The program will then calculate how many credits are needed to graduate. Display should include the student name, the degree name, and credits left to graduate.

Write two print statements in this program. In the first one, use the .format method with pre-specified order of the displayed outputs.

In the second print, using different % operators to display the output. Make sure to display the output in an aligned format (look into a sample of the output below..).

Student name: xyz xyz

Degree name: comp. engineering

Credit taken so far:                                       13

Total number of credits required: 33

Number of credits needed to graduate: 20

Q.2  Write a python program that will take in the number of call minutes used. Your program will calculate the amount of charge for the first 200 minutes with a rate of $0.25; the remaining minutes with a rate of $0.35. The tax amount is calculated as 13% on top of the total. The customer could have a credit that also has to be considered in the calculation process. Finally, the program displays all these information. Below is a sample run:

Customer account number:                                        12345

Minutes used:                                                                (you provide)

Charge for the first 200 minutes@ 0.25:                (you provide)

Charge for the remaining minutes@ 0.35:             (you provide)     

Taxes:                                                                              (you provide)

Credits:                                                                            (you provide)

Total bill:                                                                         (you provide)

please provide .py program file screenshot and output.

In: Computer Science

Write a program driver that demonstrates that your additions work. Use the following sets as part...

Write a program driver that demonstrates that
your additions work. Use the following sets as part of your demonstration
A {1,3,8}
B {2,3,5,10}
C {4,6}
show
A && B
A - B
A || B
A / B
A && C
A - C
A || C
A / C

In: Computer Science

Write a method that will have a C++ string passed to it. The string will be...

Write a method that will have a C++ string passed to it. The string will be an email address and the method will return a bool to indicate that the email address is valid.

Email Validation Rules: ( These rules are not official.)

1) No whitespace allowed

2) 1 and only 1 @ symbol

3) 1 and only 1 period allowed after the @ symbol. Periods can exist before the @ sign.

4) 3 and only 3 characters after the period is required.

*****************************

Program will prompt for an email address and report if it is valid or not according to the rules posted above. The program will loop and prompt me to continue.

*****************************

In: Computer Science

There is a single-plank bridge. Only one person can cross the bridge without any stop. The...

There is a single-plank bridge. Only one person can cross the bridge without any stop. The pedestrian can cross the bridge from west to east or from east to west. If there is more than 0 pedestrian crossing the bridge from west to east, no pedestrian can try to cross the bridge from east to west, but more than 1 pedestrian can cross the bridge from west to east, and vice versa. The pedestrian can cross the bridge immediately if there is no pedestrian on the bridge. Use Semaphore to solve this problem.

In: Computer Science

A priority queue can be implemented as a heap because a. The root can be easily...

A priority queue can be implemented as a heap because

a. The root can be easily be identified as the topmost priority.

b. The heap is not always sorted so any value can be the top priority.

c. The heap always has a left bottom node that can be the top priority.

d. None of the above.

In: Computer Science

Use JAVAfor this program Program Description You work in a local gift shop that is currently...

Use JAVAfor this program

Program Description

You work in a local gift shop that is currently running a large sale. You have been asked to create a program to calculate the total of a user’s purchases and determine if they qualify for a discount. Use the following steps to create the program:

  1. Ask the user the price of the item they wish to purchase.
  2. Ask the user the quantity they wish to purchase.
  3. Ask the user to enter the name of the item they wish to purchase.
  4. Calculate the subtotal of the purchase. The subtotal of the purchase is calculated by the following equation:

Subtotal = Price * Quantity

  1. Calculate the discount amount using the equation and table below:

Subtotal

Discount

Under $25

5% discount

$25 but not more than $75.

10% discount

Over $75

15% discount

Discount Amount = Subtotal * (Discount/100)

  1. Calculate the discounted cost of the purchase. The discounted cost of the purchase is calculated by the following equation:

Discounted Cost = Subtotal - Discount Amount

  1. Create a String object in memory to hold the text: “Discount Calculation Utility”.
  2. Display the text at the top of the output (See Sample Input and Output)
  3. Display the item name, price, quantity, subtotal, discount, and total.
  4. Format the output of the program exactly as shown in the sample output (including indentation, spacing, and a number of decimal places).

Sample Input and Output (formatting, spacing, and indentation should be as shown below)

What is the price of the item you wish to purchase? 17.99
What is the quantity you wish to purchase? 3
What is the name of the item? T-Shirt

Discount Calculation Utility
Item Name:        T-Shirt
Price: $17.99
Quantity:             3
Subtotal: $53.97
Discount: $5.40
Discounted Cost: $48.57

In: Computer Science

Create a new ASP.NET using MVC. Set the application to SSL Enabled Implement an external login...

  1. Create a new ASP.NET using MVC.
  2. Set the application to SSL Enabled
  3. Implement an external login provider Facebook.

In: Computer Science