4. Apply B-reduction to the following A-expressions as much as possible (a) (Az.z) (Ay.y y) (Ar.x a) (b) (Az.z) (Az.z z) (Az.z y) (c) (Ar.Ay.r y y) (Aa.a) b
Q: Using only the variables x and y and the functions cons, car, cdr, & reverse, provide Lisp ;…
A: Given that Lisp programming S-expressions for generating the following: 2a create (1 2 c d) (print…
Q: In kotlin, Write a recursive factorial function with an expression body (not a block body)
A: 1. Start with the main function.2. Inside the main function, specify the number for which you want…
Q: Let A = {b, h, s}. Draw A(r) for each regular expression r below. (iii) r3 = (sh)*
A: A regular expression is a pattern that describes a set of strings that matches the pattern.
Q: 5. Let R1 and R2 be regular expressions. Explain how to produce a regular expression R which…
A: A regular expression is a sequence of characters that specifies a search pattern in text.
Q: Using the following variable bindings: (setq x ‘(a b c d)) (setq y ‘(1 2 3 4)) Using only…
A: In this question we have to write a LISP program only using x, y, car, cdr and cons for the provided…
Q: What is the equivalent regular set of regular expression
A: Regular set that represents the value of the regular expression is called a regular set. Regular…
Q: Write a negation for the following statements; What is the difference between canonical form and…
A: Answer: 1. Normalized form: It represented some variables without minimization. Ex :- F = AB' + AB +…
Q: The command which transcribes the standard input to the standard output and also makes a copy of the…
A: There is only one command that transcribes the standard input to the standard output and also makes…
Q: 3) Let = {a, b}. Given a regular expression, r = bb a + aa b. Find an NFA that accepts the E…
A: From the given regular expression r, we have to design a NFA to accept the language L(r). Also find…
Q: FP(functional programming) function to
A: a. f(n) = ⟨(0, 0), (1, 1), . . . , (n, n)⟩. def f(n): return [(i,i) for i in range(n+1)]…
Q: Can you help me writing a UML diagram for the following code
A: Hello student Greetings Hope you are doing great. Thank you!!!
Q: 3) Give a regular expression defining each of the following languages over the alphabet Σ ={a, b}.…
A: Also known as, regex or regexp which means a sequence of characters that forms a search pattern. It…
Q: Using the following variable bindings: (setq x ‘(a b c d)) (setq y ‘(1 2 3 4)) Using only…
A: The below expression utilizes the built-in Lisp functions of `mapcar` and `cons` to generate a list…
Q: Define bool data type.
A: bool data type: The data type bool has been introduced in c++ to hold a boolean value, true or…
Q: Develop a C program that computes the different roots in a quadratic equation, aX + bX²=0. r= -b + v…
A: Program Logic Input coefficients of quadratic equation from user. Store it in some variable say a, b…
Q: Pure function use provides several benefits
A: Introduction the advantages of pure functions The absence of side effects in pure works is a…
Q: 10. Find a minimal expansion as a Boolean sum of Boolean products of the function xyz + (x]ỹ)z +…
A: Minimal expansion as a Boolean sum of the product of function xyz+x|y¯¯z+wxy¯ Answer: option a, d…
Q: Design DFA {w ∈ Σ ∗ | |w| ≥ 3 and the second symbol from the left end of w is different from the…
A: According to question, second symbol is different from left first so accept the language:…
Q: onstruct a regular expression for L = { w is in {a,b} * / |w| is >= 4 }
A: Regular expression for given language is = (a+b)* (a+b) (a+b) (a+b) (a+b) (a+b)*
Q: For the following pairs of expressions, find a unifier for each pair if a unifier exists. If a…
A: For the following pairs of expressions, find a unifier for each pair if a unifier exists. If a…
Q: 8. Let E = {0, 1}. Compute the language of the given regular expression. (a) L(10) (b) L(e + 0*)
A: A) L(10) Here the only string accepted by automata is 10. The language is L={w€(0,1)| w=10}
Q: 11. Find a minimal expansion as a Boolean sum of Boolean products of the function x|(jz) + (x 4 y)z…
A:
Q: In LISP, the function returns t if is a CONS cell and nil otherwise: A. (cons ) B. (consp ) C. (eq…
A: We need to find in LISP, which function returns t if <object> is a CONS cell and nil…
Q: Draw an expression tree for the following algebraic expression: (a + b * 2) / c
A: Draw an expression tree for the following expression: (a + b * 2) / c Lets see the answer in step 2
Q: When an operator is met in the postfix expression evaluation example, the two most recent operands…
A: This component of the solution is important because it ensures that the operands are used in the…
Q: operators
A: Given :- Consider two operators A and B Need to find the commutator of two operators for the given…
Q: uestion 1: Find all the strings and a regular expression for L = {VwV: V, wE {a, b)*, |V|= 2}.…
A: the answer is given below:-
Q: Evaluate the following lambda expressions using eager beta-reduction (use the standard…
A: Note : As per the guidelines , we are supposed to answer 1 question per post please repost the other…
Q: n this small funtion, identify and define each part of the function int addition (int a, int b) {…
A: Program: A program is a set of lines code that contains instructions to perform a specific task.In…
Q: • Function with no input and with no output argument. • Function with no input and with output…
A: Function with no input and with no output argument: function bmiCalculator() prompt = 'Enter…
Q: Using the following variable bindings: (setq x ‘(a b c d)) (setq y ‘(1 2 3 4)) Using only…
A: In Lisp, with the given variables x and y, we can construct the list (d c b a) using car, cdr, and…
Q: Using the following variable bindings: (setq x ‘(a b c d)) (setq y ‘(1 2 3 4)) Using only…
A: In Lisp, car is used to access the first element of a list, cdr is used to access the rest of the…
Q: Build and call a MATLAB user define funetion that used to caleulate the BMI
A: get_bmi(); % function call function get_bmi % funtion with no input no output weight =…
Q: What is the advantage and disadvantage of using tabulation method in simplifying a Boolean function…
A: Tabulation Method is a technique whose role is to reduce( minimise) the Boolean functions.
Q: 1. Give the unifyiing substitition for (x,y,z are variables): f(a) f(b) 2. Give the unifyiing…
A: (a) Here is a substituition that unifies these: { x -> a, y -> f(a), z -> f(a)} This…
Q: C++ For problems below: 1. Define variable(s) that represent input size(s) for the functions.…
A: 1. The variables that define the input size of the function is n, i.e. which we are getting as a…
Q: 2. Find a regular expression to describe the given language: { bc, b, abc, bc², ... , a*bc, bc", ...…
A: Need to find regular expression for the language : Regular Expression : It represents the sequence…
Step by step
Solved in 2 steps with 1 images
- Answer in C languageFunction Composition Functions f(x) = x + 2 and g(x)=x²-2x Evaluate (g - g)(-1) 03 -3 05 081. Give the unifyiing substitition for (x,y,z are variables): f(a) f(b) 2. Give the unifyiing substitition for (x,y,z are variables): g(x,x) g(f(a),f(y)) 3. Give the unifyiing substitition for (x,y,z are variables): g(x,x) g(f(a0,f(b))
- Description Develop a C program that computes the different roots in a quadratic equation, ax + bX?=0. r= -b ± v (b? – 4ac) , rl is the root when the + is used in the equation and r2 is the root when 2a the – is used. The roots r1 and r2 can only be computed when the discriminant (b - 4ac) is greater than the zero else the quadratic equation does not have any roots and therefore the program should display "no roots". NOTE: sąrt is a built in function in C to extract the roots. The program will prompt to input the values of a, b and c and output the roots r1 and r2 or no roots at all. Check your answer manually. Sample Output if Applicable CT 0:Ruel Lauron\C_Programs\QUAD.exe Enter the value of a:1 Enter the value of b:-3 Enter the value of c:-10 The value of x1 is 5.00 The value of x2 is -2.00Pure function use provides several benefits.subject: discrete structures there may be several correct answers Find a minimal expansion as a Boolean sum of Boolean products of the function ???̅+ (?|?̅ ̅̅̅̅̅)? + ???̅̅̅.
- 2. Find a regular expression to describe the given language: { bc, b, abc, bс?, ..., а"bс, bc", ... }Graph plotting write a code (can be in c ++, python, c # ...) that graphically represents the function f (w, t) = Eo cos (wt + δ) for the case belowEo=1 , w=1, δ=0 for t=0 to t=4πC++ For problems below: 1. Define variable(s) that represent input size(s) for the functions. Give reasoning. 2. Write down a function that represents the count of operators in terms of the input size(s). Give reasoning for your counts. 3. Determine the big-oh of the function that represents the count of operators. Give reasoning. --------------------------------------------------------------------------------- int GenerateRandomValue(int min, int max) { return rand() % (max - min + 1) + min; }
- Q1. a) Give a regular expression for the language over {0,1}. marks) Beginning and ending with the same symbol. b) Construct a NFA for the regular expression 0*(1+01) c) For the given below DFA, construct the corresponding regular expression using Arden's Lemma а, b b a aWhen an operator is met in the postfix expression evaluation example, the two most recent operands are popped so that the subexpression may be evaluated. The first popped operand is handled as the second operand in the subexpression, whereas the second popped operand is the first. Give and explain an example of how this component of the solution is important.Journal Bearing Properties Code Write a Matlab program code to determine the properties of the journal bearing and heat dissipation. You need to convert all charts and tables of the journal bearing properties from the textbook into a curve fit equation. The code must include the four cases of the length- diameter ratio (L/d) and the interpolation equation for a different L/d ratio. Test your code by solving Problem 12.11 from the textbook and compare the results with hand calculation. A full formal report must be submitted include all the curve fit equation for all charts and tables, sample calculations and the printed Matlab code with the results. A soft copy of the program code is required as well.