Other Programming & Computer Science Answers

Questions: 1 635

Free Answers by our Experts: 1 359

Ask Your question

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Question 1: Give three examples of deadlock scenario from human environments that are not related to computer system.



Question 2: Banker’s Algorithm is one of the techniques for deadlock avoidance. Discuss and analyze Banker’s algorithm in detail.




Question 3: Formulate a hypothetical scenario for the resource allocation problem. Use it to work through a safety algorithm to explain the concept of finding out whether or not a system is in a safe state.

Question 1:





Let L be the language consisting of all strings of a's and b's containing the substring abba.






a) Construct a DFA for L.






b) Represent the DFA for L as regular expression.






b) Show the DFA for L scanning the shortest possible word in L.






(Hint: A substring "abba" can comes at the beginning, middle or end of a string of a's and b's of L)

Write an assembly program to input week number (1-3) and print day of week name using case structure:

1 = Monday

2 = Tuesday

3 = Wednesday


What types of symbols are utilized to represent the various functions?


Convert the following to binary numbers to decimals using the long method.


1. 1101001


2. 10001.1101


3. 101110


4. 101010.1111


5. 111001



Convert the following decimal numbers to binary.


1. 76


2. 119


3. 1032


4. 1010


5. 242



Write a program using for loop statement that will display a series of number in ascending and descending order and it will also display the odd and even numbers.




Note: Use scanner and for loop statement



Sample output:




Enter a number: 15




Number in ASCENDING orders


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15



Number in DESCENDING orders


15 14 13 12 11 10 9 8 7 6 5 4 3 2 1



EVEN Number


2 4 6 8 10 12 14



ODD Number


1 3 5 7 9 11 13 15






Write a program using for loop statement that will display a series of number in ascending and descending order and it will also display the odd and even numbers.




Note: Use scanner and for loop statement




Sample output:





Enter a number: 15




Number in ASCENDING orders



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15





Number in DESCENDING orders



15 14 13 12 11 10 9 8 7 6 5 4 3 2 1





EVEN Number



2 4 6 8 10 12 14





ODD Number



1 3 5 7 9 11 13 15






How many 50 kb jpg files can be stored emb folder in your hard drive

Write a program using for loop statement that will display a series of number in ascending and descending order and it will also display the odd and even numbers.



Note: Use scanner and for loop statement



Sample output:




Enter a number: 15



Number in ASCENDING orders


1


2


3


4


5


6


7


8


9


10


11


12


13


14


15



Number in DESCENDING orders


15


14


13


12


11


10


9


8


7


6


5


4


3


2


1



EVEN Number


2


4


6


8


10


12


14



ODD Number


1


3


5


7


9


11


13


15



Write a program using for loop statement that will display a series of number in ascending and descending order and it will also display the odd and even numbers.



Note: Use scanner and for loop statement



Sample output:




Enter a number: 15



Number in ASCENDING orders


1


2


3


4


5


6


7


8


9


10


11


12


13


14


15



Number in DESCENDING orders


15


14


13


12


11


10


9


8


7


6


5


4


3


2


1



EVEN Number


2


4


6


8


10


12


14



ODD Number


1


3


5


7


9


11


13


15





LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS