Question: Answer the following questions: 1) Write the argument using propositional wffs. Then using propos…

Answer the following questions: 1) Write the argument using propositional wffs. Then using propositional logic, prove the argument is valid. If the advertisement is successful then the sales volume will go up. Either the advertisement is successful or the store will close. The sales volume will not go up. Therefore, the store will close. (A, S, C) 2) Write the negation of the statements. If she cries today then I will be happy or energetic. 3) Use mathematical induction to prove the following statement. 4+ 8 + 12 + … + 4n = 2n(n + 1)

Question: 2. Description 2.1 Tables with Primary Keys The primary key for each table is underlined. Movies(…

Create a View in SQL

2. Description 2.1 Tables with Primary Keys The primary key for each table is underlined. Movies(movieID, name, year, rating, length, totalEarned) Theaters(theaterID, address, numSeats) TheaterSeats(theater D, seatNum, brokenSeat) Showings(theaterID, showingDate, startTime, movielD, priceCode) Customers(customerID, name, address, joinDate, status) Tickets(theaterID, seatNum, showingDate, startTime, customerID, ticketPrice) ModifyShowings(theaterID, showingDate, startTime, movieID) 2.6 Working with views 2.6.1 Create a view Although the Movies table has a totalEarned field, there’s another way that we can calculate the total amount that a movie has earned. For each showing (in Showings) of that movie, there may be ticket tuples (in Tickets) for that movie’s movieID. Each Tickets tuple has a ticketPrice. So the computedEarnings of a movie can be calculated by adding up ticketPrice for all of the Tickets tuples that correspond to Showings of that movie. Create a view called earningsView that has 2 attributes, movieID and computedEarnings This view should have a tuple for each movieID that gives the computedEarnings for that movietID. Your view should have no duplicates in it. And as you’ve probably already deduced, you’ll need to use a GROUP BY in your view. But there’s one challenging aspect of this problem: What happens if there’s a movieID for which there are no tickets? Well, there still should be a tuple for that movieID in earnings View, and that tuple’s computedEarnings should be 0. Save the script for creating the earnings View view in a file called createview.sql

Question: Can someone help with these 2 questions and add comments and also not use pseduo instruction

Can someone help with these 2 questions and add comments
and also not use pseduo instruction

You are not allowed to use any pseudo-instruction for this assignment. 1. Without using MUL and DIV instructions, implement the following nested for loop (given in C) in the MIPS assembly: (10 Marks] for (i = 0; i < x; i++) { for(j = 0; j < y; j++) { Array[2*j] = (i + j)/4; Arraun Assume the values of x, y, i and jare in registers $55, $s, $t5, $th respectively. Assume that the register $t7 holds the base address of the array Array. (10 Marks) 2. Implement the equivalent MIPS code for the following C code: int func1(int n) { if (n != 0) return n + funci (n - 1); else return n + funci (n + 1);

Question: For the following question, your submission should contain 3 Matlab functions and a Matlab script…

For the following question, your submission should contain 3
Matlab functions and a Matlab script.
(a) Create a Matlab program function that applies Newton’s
method for a given function f, it’s derivative f1, an initial guess
x0, and a predetermined tolerance for residue tol. This program
should output x: the estimate for the root of f with residue
smaller then tol, n: the number of iterations the program used to
reach the specified tolerance.
(b) Create a Matlab program function that applies false position
method for a given function f, initial guesses x0 and x1, and a
predetermined tolerance for residue tol. This program should output
x: the estimate for the root of f with residue smaller then tol, n:
the number of iterations the program used to reach the specified
tolerance.
(c) Create a Matlab program function that applies the bisection
method for a given function f, initial guesses a and b, and a
predetermined tolerance for residue tol. This program should output
x: the estimate for the root of f with residue smaller then tol, n:
the number of iterations the program used to reach the specified
tolerance.
(d) Create a Matlab script function that uses the functions
created in (a), (b) and (c) for the function f = x 27 − 10 with
tolerances 0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001, 0.0000001,
0.00000001, 0.000000001, 0.0000000001. Also take x0=1 for (a),
x0=5,x1=15 for (b) and a=0, b=15 for (c).
(e) Report and compare the results of these calculations as
comments on your script file

Question: Python error: GradientDescent.py:20: RuntimeWarning: overflow encountered in multiply   D_m …

Python error: GradientDescent.py:20: RuntimeWarning: overflow
encountered in multiply

D_m = (-2/n)*sum(x*(y-Y_pred))

GradientDescent.py:22: RuntimeWarning: invalid value encountered in
double_scalars

m = m-L*D_m

nan nan
I’m trying to make a program that calculates linear regression
using gradient descent. However, the program gives up and does not
show the line on top of the scatter plot. How would I fix this
error?
Code:
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
x = pd.read_csv(‘ex3x.csv’)
x = x.iloc[:,0].values
y = pd.read_csv(‘ex3y.csv’)
y = y.iloc[:,0].values
m = 0
c = 0
L = 0.0001 #The learning rate
epochs = 1000 #The number of iterations to perform gradient
descent
n = float(len(x))
for i in range(epochs):
Y_pred = m*x + c
D_m = (-2/n)*sum(x*(y-Y_pred))
D_c = (-2/n)*sum(y-Y_pred)
m = m-L*D_m
c = c-L*D_c
print(m,c)
Y_pred = m*x+c
plt.scatter(x,y)
plt.plot([min(x),max(x)], [min(Y_pred),max(Y_pred)],
color=’red’)
plt.show()
13 L = 0.0001 #The learning rate epochs = 1000 #The number of iterations to perform gradient descent 16 n = float(len(x)) 18 for i in range(epochs): -.Y_pred = m*x + c —D_m = (-2/n)*sum(x*(y-Y_pred)) D C = (-2/n) *sum(y-Y pred) m = m-L*Dm C = C-L*D_C T print(m,c) Y_pred = m*x+C 28 plt.scatter(x,y) 29plt.plot([min(x), max(x)], [min(Y_pred), max (Y_pred)], color=’red’), 30 plt.show()

Question: 16. The working file of SAGE 50 has which of these extensions? a..sai b..cab c. .saj d. .docx 17….

16. The working file of SAGE 50 has which of these extensions? a..sai b..cab c. .saj d. .docx 17. An invoice can be created without a source document number a. True b. False 18. The date shown in general journal a. is the transaction date by default b. is the session date by default c. cannot be changed d. always must be changed 14. One can change the Date Format of SAGE 50 by which sequence a. Company module ->settings-> date format b. Dash Board->date format c. Payables module->settings->date format d. General journal-> settings->date format 15. Every payment transaction has to refer an invoice a. True b. False