CSE_142_WI24_HW3
.pdf
keyboard_arrow_up
School
University of California, San Diego *
*We aren’t endorsed by this school
Course
142
Subject
Computer Science
Date
May 17, 2024
Type
Pages
7
Uploaded by KidSpider1136
CSE 142: Computer Architecture: A Software Perspective
Winter 2024
Homework 3
Instructor: Leo Porter
Due on:
Tuesday, 13 February
(32 points)
Name:
Date:
Instructions
•
Answer each problem in the boxes provided. Any writing outside of the boxes will NOT be graded. Do not
turn in responses recorded on separate sheets.
•
Handwritten or typed responses are accepted. In either case, make sure all answers are in the appropriate
boxes.
•
All responses must be neat and legible. Illegible answers will result in zero points.
1.
Locality
(2 point -
Completeness
):
For a 2-D array, the first index is the row, and the second index is the column. Assume each word is a 32
bit integer and the array is stored in row major order. Also assume that the variables i,j and sum are stored
in registers:
for (i=0; i<100; i++){
for(j=0; j<4000; j++){
sum+= a[j][i] + b[j][i];
}
}
It is observed that the above piece of code suffers from significant memory latency. Why do you think it has
these large memory delays and how can we improve the code to reduce this?
2.
Cache Basics
(6 points -
Correctness
):
We want to explore three different 1024 byte cache designs: direct-mapped, 4-way set-associative, and fully-
associative. All three caches have 64-byte block size and use 32-bit byte addressing. How many bits do you
need to assign for the tag, index, and block offset field for the three different caches? Please write down the
number of bits in the table below.
Cache
direct-mapped
4-way set-associative
fully-associative
block offset
Index
Tag
3.
Cache Accesses
(6 points -
Correctness
):
Complete the following table for each of the below cache configurations:
(a) Cache size - 512 byte, 2-way set associative cache with 64-byte block size.
(b) Cache size - 512 byte, fully associative cache with 64-byte block size.
For each access fill the last column with the type of cache miss if it is a miss (Just write hit if it’s a cache
hit). Use Least Recently Used (LRU) as the replacement policy. Show tag, index and offset bits calculation
in the box below to get full credits.
(You may use the empty space on the right side of the tables to keep track of the cache contents.)
Cache (a)
Cache (b)
block offset
Index
Tag
Sr.
No.
Address (in binary)
Cache (a) (Type of Cache Miss)
1
0010 0110 0000
2
1101 1000 0100
3
0000 0110 0110
4
0101 1110 1010
5
1110 0100 1110
6
1010 0010 0000
7
0010 0110 0001
8
1011 1010 0011
9
1101 1000 1100
10
1000 1100 1100
11
1111 1010 0000
12
1011 1000 1011
13
0100 0000 1110
14
0111 1110 0010
15
0101 1111 1010
16
0111 1111 0011
17
1010 0000 0001
18
0010 0110 0001
19
1110 0110 0010
20
0100 0001 1000
21
1111 1010 1110
22
1011 1001 1011
23
1001 0011 1111
24
0101 1110 0010
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Vocabulary
Task (C language)
Solution given below. How to fix the error in the picture attached. txt file is not being created from this code
please also include how to create a txt file and where will it be saved in the computer
Natural language processing (NLP) is a field of artificial intelligence that seeks to develop the ability of a computer program to understand human language. Usually, the first step of an NLP system is to convert words into numeric codes. Thus, the system converts an input text into a sequence of numeric codes before any high-level analysis. This process is known as text preprocessing.
We can only perform text preprocessing if we have a vocabulary of words and their associated numeric codes. Your task is to create a vocabulary of unique words for a given text file and assign a different number from 1 to N to each unique word, with N being the total number of unique words. You must perform this assignment so that the first word in alphabetical order gets the…
arrow_forward
None
arrow_forward
Transcribed Image Text
A student took four quizzes in a term and would like to compute their average. He also would like to know what will be the remarks. Follow the range of grades and its equivalent remarks, and then fill-up the table below: 100-95 - Excellent 94-90 – Very Satisfactory 89-85 - Satisfactory 84-80 - Fine 79-75 - Fair 74 and below - Poor
arrow_forward
The Philosophers' Dinner Problem
Five philosophers sit around a table and spend their lives dining and thinking. Each philosopher has a bowl of noodles and a fork to the left of your plate. To eat the noodles you need two forks and each philosopher you can only take the ones to your left and right. If any philosopher takes a fork and the other is busy, he will wait, fork in hand, until pick up the other fork, so you can start eating later. If two adjacent philosophers try to pick up the same fork at the same time, a race condition: they both compete to take the same fork, and one of them left without eating. If all the philosophers take the fork to their right at the same time, then everyone will be waiting forever, because someone must release the fork that is lack. No one will because everyone is in the same situation (hoping that someone put down their forks). Then the philosophers will starve. This lock mutual is called deadlock or deadlock. The problem is to find an algorithm that…
arrow_forward
11 Worksheet 5
Note:Solution using Matlab Code
Write a program that prompts the user to enter a number within the range of 1 through 7, those
numbers represent the weekdays as shown in the table. If the entered number is more than 7,
display 'invalid day'.
Number
1
2
3
4
5
6
7
Day
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Type of the day
Workday
Workday
Workday
Workday
Workday
Weekend
Weekend
The program should continue to repeat itself 10 times, after which, the program should stop.
Furthermore, the program should be able to show a message saying if this is a 'workday' or a
'weekend day'.
Note: you are required to add a comment beside your command. Hint: to add a comment you
may use the % sign. thank guys you dodo great.
arrow_forward
Part 2 only
arrow_forward
Moon effect. Some people believe that the Moon controls their activities. If the Moon moves from being directly on the opposite side of
Earth from you to being directly overhead, by what percentage does (a) the Moon's gravitational pull on you increase and (b) your
weight (as measured on a scale) decrease? Assume that the Earth-Moon (center-to-center) distance is 3.82 x 10° m, Earth's radius is
6.37 x 106 m, Moon's mass is 7.36 x 1022 kg, and Earth's mass is 5.98 x 1024 kg.
(a) Number
6.89
Units
percent
(b) Number
i
6.8713e-4
Units
percent
arrow_forward
Question 4 - Algorithm Design
Imagine you are a treasure hunter standing at one side of the river. There are n (a positive
integer) stones on the river. They are aligned on a straight line and at the nth stone, there is
treasure waiting for you. Your target is to reach the nth stone. For each move, you have the
choice of either walking (move one stone ahead) or leaping (move two stones ahead). Also, you
are not allowed to travel backwards. Design an algorithm that calculates the number of ways
(sequences of walks/leaps) that get you to the treasure stone. You should clearly explain the
algorithm and demonstrate the correctness of the algorithm with a complete proof.
Here is an example. For n =
1
5, there are 8 ways:
Method 1: walk → walk → walk → walk → walk
Method 2: walk → walk → walk → leap
Method 3: walk → walk → leap → walk
Method 4: walk → leap → walk →
walk
walk
Method 5: leap → walk → walk →
Method 6: leap → leap walk
Method 7: leap → walk → leap
Method 8: walk → leap leap
arrow_forward
MULTIPLE CHOICE -The answer is one of the options below please solve carefully and circle the correct option Please write clear .
arrow_forward
UML Design for Turing Machine
Description:
An electro-mechanical device used by the British cryptologists to help
decipher German Enigma-machine-encrypted secret messages during World War II.
A Turing Machine is a very simple abstract model of computation. The machine has an
infinite tape that is divided into cells (or squares). Each cell contains a symbol (or character)
chosen from some small set of possible symbols. Most of the cells are blank, that is, they
contain the blank symbol. The number of non-blank cells is finite. The machine is located on
one of the cells, and it can only "see" the symbol in the cell where it is located. It can write a
new value to that cell. It can move left or right on the tape, one cell at a time. The machine is in
one of a fixed, finite number of possible states. One of the states is the halt state.
A Turing Machine has a table of rules. The table of rules is the program for the machine. A rule
tells the machine what action to take when it is in a…
arrow_forward
Question-1
Friend's Party Circle:
There are a few friends living in the same area.
They have a party every weekend and the place
of party change each week. It is always a
lifficult task to select a place which is nearest
for everyone. They
advantage of Computer Science to solve this
problem.
all decided to take
Names of friends are Ahmed, Rehman, Careem,
Basit, Dawood, Ghani, and Farid. Ahmed lives
at 5 minutes' walk from rehman and at 10
minutes' walk from Careem. Careem lives at 3
minutes' walk from Dawood. Rehman lives at 4
minutes' walk from Basit and 2 minutes' walk
from Dawood. Dawood lives at two minutes'
walk from Farid. Ghani lives at 2 minutes' walk
from Basit.
a. If we represent a graph G = V (V, E) in
which set of vertices are home of each
Friend and an edge represents a path
between
two
homes.
Provide the
adjacency matrix of directed graph of
the graph G.
b. In above directed graph G. You are
required to devise an algorithm to find
all possible paths.
arrow_forward
Entered
Answer Preview
Result
Message
correct
(923,998)
(923,998)
(2398,2171)
(2398, 2171)
correct
(2,808)
(2,808)
Your answer isn't a number
incorrect
(it looks like a list of numbers)
At least one of the answers above is NOT correct.
(1 point) Consider the elliptic curve group based on the equation
y²
= x + ax + b
x3
mod p
where a =
2440, b = 295, and p
=
3391.
We will use these values as the parameters for a session of Elliptic Curve Diffie-Hellman Key Exchange. We
will use P = (2, 808) as a subgroup generator.
You may want to use mathematical software to help with the computations, such as the Sage Cell Server
(SCS).
On the SCS you can construct this group as:
G=Elliptic Curve (GF(3391), [2440,295])
Here is a working example.
(Note that the output on SCS is in the form of homogeneous coordinates. If you do not care about the details
simply ignore the 3rd coordinate of output.)
Alice selects the private key 18 and Bob selects the private key 15.
What is A, the public key of Alice?…
arrow_forward
answer b and c
You are obligated to answer 3 subparts
arrow_forward
Sequential Money Problem (Coin Row)• Suppose there are n coins lined up side by side on a table; Let the values of these coins be c₁, c₂, ..., cn (the valuesthey do not have to be different from each other, there may be more than one coin of the same value on the table; but all positive).• The goal is not to take two adjacent coins on the table side by side.collecting the largest total valuable coins from the table, provided that
The algorithm that solves the Ordered Money problem;a. By using the brute-force method, evaluating all possible valid alternatives and reaching the result (with the "exhaustive search" method),b. Write the "recurrence" equation that describes the problem directly (without using the dynamic programming technique).
Describe the time complexity of each of your algorithms for both of the above spelling.
arrow_forward
HW2
In an experiment to determine the spring constant of an elastic
cord of length 0.60 m, a student hangs the cord from a rod as
represented and then attaches a variety of weights to the cord.
For each weight, the student allows the weight to hang in
equilibrium and then measures the entire length of the cord.
The data are recorded in the table below
Į
Weight (N) 0
10 15 20 25
Length (m) 0.60 0.97 1.24 1.37 1.64
1- Plot the force/elongation curve using Matlab.
2- Deduce the spring constant of the cord.
arrow_forward
Correct answer will be upvoted else Multiple Downvoted. Don't submit random answer. Computer science.
anglers have recently gotten back from a fishing excursion. The I-th angler has gotten a fish of weight man-made intelligence.
Anglers will flaunt the fish they got to one another. To do as such, they initially pick a request where they show their fish (every angler shows his fish precisely once, in this way, officially, the request for showing fish is a stage of integers from 1 to n). Then, at that point, they show the fish they discovered by the picked request. At the point when an angler shows his fish, he may either become glad, become dismal, or stay content.
Assume an angler shows a fish of weight x, and the most extreme load of a formerly shown fish is y (y=0 if that angler is quick to show his fish). Then, at that point:
in the event that x≥2y, the angler becomes cheerful;
in the event that 2x≤y, the angler becomes miserable;
in the event that none of these two…
arrow_forward
10 - In an examination, 500 students appeared. Out of these students, 38 % got A+ grade, 45 % got B+ and the remaining just passed. Assuming that no student failed, find the number of students who got A+, B+ and the number of students who just passed.(Python code)
arrow_forward
Asap
arrow_forward
3 نقاط
*
To plot two curves on the
-:same figure area
(hold on) is
the command
used between two plot
statements.
a loop that runs two times is
used.
the number (2) is placed
before the command (plot).
the command (clc) is used
between two plot statements.
a two dimensional matrix is
used.
هذا السؤال مطلوب
D
arrow_forward
Java Programming Project
You need to make an exam application in the project. Write the project using JavaFX. Do
not use a database. Accordingly, what is requested must be performed:
1. Adding questions to the question bank: different types of questions should be
added to the question bank. Question types include multiple choice, True/False, fill-in,
and classic type questions. It is mandatory to use inheritance and polymorphism in
writing classes related to questions and in using their objects.
For example, a multiple choice question should have the following information:
a) question text
b) answer options such as a, b, c, d
c) answer
d) points
e) degree of difficulty (such as easy, normal and difficult)
In the upper classes, taking into account the content of other types of questions and
subclasses must be determined which properties should be.
2. Removing a question from a question bank: finding a question that will be deleted
first when removing a question from a question bank it…
arrow_forward
Exams.cpp) Suppose a teacher weights the fourexams he gives 10%, 25%, 30%, and 35%. Write a programthat reads ten sets of four grades, prints the weightedaverage of each set, and prints the unweighted average ofeach test. The number of students should be in a globalconstant.
arrow_forward
grok
Introduction to Programming (Python)
academy
8 - Looping and lists
Yuor biran is an azamnig thnig
Instructions Tutoring
O Problem
pi
Image source
na
Two words are anagrams of each other if they contain the same letters in them. So
na
left is an anagram of felt and vice-versa. A Super Anagram is a special kind of
So
anagram. A Super Anagram is an anagram whose first and last letters are the same.
So
if
Your program needs to read in two words on a single line. If the pair of words are Super
Anagrams of each other, print out Super Anagram!. If the pair of words is not a Super
Anagram (so a human couldn't read it), then print out Huh?. For one-letter words, the
first letter is the last letter.
So, for example:
Enter words: brain brian
Super Anagram!
and another example:
Enter words: too two
Huh?
arrow_forward
Question-1
Friend's Party Circle:
There are a few friends living in the same area.
They have a party every weekend and the place
of party change each week. It is always a
difficult task to select a place which is nearest
for everyone. They all decided
advantage of Computer Science to solve this
problem.
to take
Names of friends are Ahmed, Rehman, Careem,
Basit, Dawood, Ghani, and Farid. Ahmed lives
at 5 minutes’walk from rehman and at 10
minutes' walk from Careem. Careem lives at 3
minutes' walk from Dawood. Rehman lives at 4
minutes' walk from Basit and 2 minutes' walk
from Dawood. Dawood lives at two minutes'
walk from Farid. Ghani lives at 2 minutes' walk
from Basit.
b. In above directed graph G. You are
required to devise an algorithm to find
all possible paths.
arrow_forward
A midterm exam has two parts. Part 1 consists of ten multiple choice questions. Each question hasfour choices, labeled (a), (b), (c), and (d), and one may pick any combination of responses on each ofthese questions. For example, one could choose just (a) alone on one question, or both (b) and (c),or all four possibilities, or none of them. In Part 2, one may choose either to answer eight true/falsequestions, or to select the proper definition of each of seven terms from a list of ten possible definitions.Every question must be answered on whichever portion (true/false or definition) of Part 2 is chosen,but one is not allowed to complete both the true/false and the definition portions. How many waysare there to complete the exam?
arrow_forward
8. A game is played by moving a game piece left or right along a horizontal game board. The board consists of
spaces of various colors, as shown. The circle represents the initial location of the game piece.
Yellow
Black
Green
Green
Red
Yellow
Black
Black
Yellow
Black
The following algorithm indicates how the game is played. The game continues until the game is either won
by landing on the red space or lost when the piece moves off either end of the board.
Step 1: Place a game piece on a space that is not red and set a counter to 0.
Step 2: If the game piece is on a yellow space, move the game piece 3 positions to the left and go to step 3.
Otherwise, if the game piece is on a black space, move the game piece 1 position to the left and go to step 3.
Otherwise, if the game piece is on a green space, move the game piece 2 positions to the right and go to step
3.
Step 3: Increase the value of the counter by 1.
Step 4: If game piece is on the red space or moved off the end of the game…
arrow_forward
I.) The computer generates a random list of distinct numbers (no duplicates), to be used as the numbers called out during game play.II.) As the numbers from the list are called out, a comparison to your card is performed. III.) If your card contains the number called out, a marker(*) is placed next to the entry of your card with an appropriate message.IV.) You win the game when your card has markers ina. all entries across any row, b. all entries down any column,c. along any full diagonal, or d. in all four corners, ore. In the center four squaresV.) The game is over if the 65th number is called out and a winning combination has not been achieved.The results of the game should include:I.) an indication if you won/lost,
arrow_forward
question 7
arrow_forward
Introductory:
The Caesar Cipher technique is one of the earliest and simplest methods of encryption techniques. It is simply a type of substitution cipher, i.e., each letter of a given text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, A would be replaced by B, B would become C, and so on. The method is apparently named after Julius Caesar, who apparently used it to communicate with his officials.
Thus, to cipher a given text we need an integer value, known as a shift which indicates the number of positions each letter of the text has been moved down.
The encryption can be represented using modular arithmetic by first transforming the letters into numbers, according to the scheme, A = 0, B = 1 ,…, Z = 25. Encryption of a letter by a shift n can be described mathematically as.
En(x) = (x+n) mod 26
(Encryption Phase with shift n)
Write an algorithm and implement a program in C to read the data from a file (called…
arrow_forward
EXERCISE No.3
A student took four quizzes in a term and would like to compute their average. He also would like
to know what will be the remarks. Follow the range of grades and its equivalent remarks, and then
fill-up the table below:
100-95 - Excellent
94-90 – Very Satisfactory
89-85 - Satisfactory
84-80 - Fine
79-75 - Fair
74 and below – Poor
REQUIREMENTS
1. Write the corresponding algorithm
a. Narrative
b. Pseudocode
2. Create the equivalent flowchart based on the algorithm of the given problem
3. Construct the program and record your screen display result
QUESTIONS:
1. What statement in the program that determines that the average is passing?
2. What was the condition applied to satisfy the requirement?
3. What have you observed in using if-else statement in this program?
4. What have you observed in using nested if statement in this program?
arrow_forward
An
is a step-by-step procedure for finding the solution to a problem.
arrow_forward
In Section 3.1 question 32 (textbook version 11), complete the table by filling in the value for each variable after each line is executed.
Can you actually solve the question? step by step? Because I know the explanation already. I just don't know how to do it in Vistual Basic..
arrow_forward
MODELLING AND SIMULATION:
How do each quotations affect the modeling and simulation?
***Famous Simulation Quotes
“You Cannot Study a System by Stopping It”
“Run It Again”
“Is That Some Kind of Game You Are Playing?”
arrow_forward
pizza (python)Mario owns a pizzeria. Mario makes all of his pizzas from 10 different ingredients, using 3 ingredients on each pizza. Mario’s cousin Luigi owns a pizzeria as well. Luigi makes all his pizzas from 9 ingredients, using 4 ingredients on each pizza. Mario and Luigi have made a bet: Mario believes that customers can order a larger selection of pizzas in his pizzeria than they can order in Luigi’s pizzeria. Use functions for this assignment.
Implement a factorial() function yourself (do not use the one from the math module)
When choosing k items from n possible items, the number of possibilities can be obtained using the following formula:
(??)=?!?!(?−?)!(nk)=n!k!(n−k)!
Make a function called choose with two parameters n and k, that implements the above formula.
Write a program that calculates the number of pizzas Mario and Luigi can make. The outcome should look like this:
Mario can make 120 pizzas.Luigi can make 126 pizzas. Luigi has won the bet.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole
Related Questions
- Vocabulary Task (C language) Solution given below. How to fix the error in the picture attached. txt file is not being created from this code please also include how to create a txt file and where will it be saved in the computer Natural language processing (NLP) is a field of artificial intelligence that seeks to develop the ability of a computer program to understand human language. Usually, the first step of an NLP system is to convert words into numeric codes. Thus, the system converts an input text into a sequence of numeric codes before any high-level analysis. This process is known as text preprocessing. We can only perform text preprocessing if we have a vocabulary of words and their associated numeric codes. Your task is to create a vocabulary of unique words for a given text file and assign a different number from 1 to N to each unique word, with N being the total number of unique words. You must perform this assignment so that the first word in alphabetical order gets the…arrow_forwardNonearrow_forwardTranscribed Image Text A student took four quizzes in a term and would like to compute their average. He also would like to know what will be the remarks. Follow the range of grades and its equivalent remarks, and then fill-up the table below: 100-95 - Excellent 94-90 – Very Satisfactory 89-85 - Satisfactory 84-80 - Fine 79-75 - Fair 74 and below - Poorarrow_forward
- The Philosophers' Dinner Problem Five philosophers sit around a table and spend their lives dining and thinking. Each philosopher has a bowl of noodles and a fork to the left of your plate. To eat the noodles you need two forks and each philosopher you can only take the ones to your left and right. If any philosopher takes a fork and the other is busy, he will wait, fork in hand, until pick up the other fork, so you can start eating later. If two adjacent philosophers try to pick up the same fork at the same time, a race condition: they both compete to take the same fork, and one of them left without eating. If all the philosophers take the fork to their right at the same time, then everyone will be waiting forever, because someone must release the fork that is lack. No one will because everyone is in the same situation (hoping that someone put down their forks). Then the philosophers will starve. This lock mutual is called deadlock or deadlock. The problem is to find an algorithm that…arrow_forward11 Worksheet 5 Note:Solution using Matlab Code Write a program that prompts the user to enter a number within the range of 1 through 7, those numbers represent the weekdays as shown in the table. If the entered number is more than 7, display 'invalid day'. Number 1 2 3 4 5 6 7 Day Sunday Monday Tuesday Wednesday Thursday Friday Saturday Type of the day Workday Workday Workday Workday Workday Weekend Weekend The program should continue to repeat itself 10 times, after which, the program should stop. Furthermore, the program should be able to show a message saying if this is a 'workday' or a 'weekend day'. Note: you are required to add a comment beside your command. Hint: to add a comment you may use the % sign. thank guys you dodo great.arrow_forwardPart 2 onlyarrow_forward
- Moon effect. Some people believe that the Moon controls their activities. If the Moon moves from being directly on the opposite side of Earth from you to being directly overhead, by what percentage does (a) the Moon's gravitational pull on you increase and (b) your weight (as measured on a scale) decrease? Assume that the Earth-Moon (center-to-center) distance is 3.82 x 10° m, Earth's radius is 6.37 x 106 m, Moon's mass is 7.36 x 1022 kg, and Earth's mass is 5.98 x 1024 kg. (a) Number 6.89 Units percent (b) Number i 6.8713e-4 Units percentarrow_forwardQuestion 4 - Algorithm Design Imagine you are a treasure hunter standing at one side of the river. There are n (a positive integer) stones on the river. They are aligned on a straight line and at the nth stone, there is treasure waiting for you. Your target is to reach the nth stone. For each move, you have the choice of either walking (move one stone ahead) or leaping (move two stones ahead). Also, you are not allowed to travel backwards. Design an algorithm that calculates the number of ways (sequences of walks/leaps) that get you to the treasure stone. You should clearly explain the algorithm and demonstrate the correctness of the algorithm with a complete proof. Here is an example. For n = 1 5, there are 8 ways: Method 1: walk → walk → walk → walk → walk Method 2: walk → walk → walk → leap Method 3: walk → walk → leap → walk Method 4: walk → leap → walk → walk walk Method 5: leap → walk → walk → Method 6: leap → leap walk Method 7: leap → walk → leap Method 8: walk → leap leaparrow_forwardMULTIPLE CHOICE -The answer is one of the options below please solve carefully and circle the correct option Please write clear .arrow_forward
- UML Design for Turing Machine Description: An electro-mechanical device used by the British cryptologists to help decipher German Enigma-machine-encrypted secret messages during World War II. A Turing Machine is a very simple abstract model of computation. The machine has an infinite tape that is divided into cells (or squares). Each cell contains a symbol (or character) chosen from some small set of possible symbols. Most of the cells are blank, that is, they contain the blank symbol. The number of non-blank cells is finite. The machine is located on one of the cells, and it can only "see" the symbol in the cell where it is located. It can write a new value to that cell. It can move left or right on the tape, one cell at a time. The machine is in one of a fixed, finite number of possible states. One of the states is the halt state. A Turing Machine has a table of rules. The table of rules is the program for the machine. A rule tells the machine what action to take when it is in a…arrow_forwardQuestion-1 Friend's Party Circle: There are a few friends living in the same area. They have a party every weekend and the place of party change each week. It is always a lifficult task to select a place which is nearest for everyone. They advantage of Computer Science to solve this problem. all decided to take Names of friends are Ahmed, Rehman, Careem, Basit, Dawood, Ghani, and Farid. Ahmed lives at 5 minutes' walk from rehman and at 10 minutes' walk from Careem. Careem lives at 3 minutes' walk from Dawood. Rehman lives at 4 minutes' walk from Basit and 2 minutes' walk from Dawood. Dawood lives at two minutes' walk from Farid. Ghani lives at 2 minutes' walk from Basit. a. If we represent a graph G = V (V, E) in which set of vertices are home of each Friend and an edge represents a path between two homes. Provide the adjacency matrix of directed graph of the graph G. b. In above directed graph G. You are required to devise an algorithm to find all possible paths.arrow_forwardEntered Answer Preview Result Message correct (923,998) (923,998) (2398,2171) (2398, 2171) correct (2,808) (2,808) Your answer isn't a number incorrect (it looks like a list of numbers) At least one of the answers above is NOT correct. (1 point) Consider the elliptic curve group based on the equation y² = x + ax + b x3 mod p where a = 2440, b = 295, and p = 3391. We will use these values as the parameters for a session of Elliptic Curve Diffie-Hellman Key Exchange. We will use P = (2, 808) as a subgroup generator. You may want to use mathematical software to help with the computations, such as the Sage Cell Server (SCS). On the SCS you can construct this group as: G=Elliptic Curve (GF(3391), [2440,295]) Here is a working example. (Note that the output on SCS is in the form of homogeneous coordinates. If you do not care about the details simply ignore the 3rd coordinate of output.) Alice selects the private key 18 and Bob selects the private key 15. What is A, the public key of Alice?…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole