Answer:
See explaination for the program code
Explanation:
The code below
Pseudo-code:
//each item ai is used at most once
isSubsetSum(A[],n,t)//takes array of items of size n, and sum t
{
boolean subset[n+1][t+1];//creating a boolean mtraix
for i=1 to n+1
subset[i][1] = true; //initially setting all first column values as true
for i = 2 to t+1
subset[1][i] = false; //initialy setting all first row values as false
for i=2 to n
{
for j=2 to t
{
if(j<A[i-1])
subset[i][j] = subset[i-1][j];
if (j >= A[i-1])
subset[i][j] = subset[i-1][j] ||
subset[i - 1][j-set[i-1]];
}
}
//returns true if there is a subset with given sum t
//other wise returns false
return subset[n][t];
}
Recurrence relation:
T(n) =T(n-1)+ t//here t is runtime of inner loop, and innner loop will run n times
T(1)=1
solving recurrence:
T(n)=T(n-1)+t
T(n)=T(n-2)+t+t
T(n)=T(n-2)+2t
T(n)=T(n-3)+3t
,,
,
T(n)=T(n-n-1)+(n-1)t
T(n)=T(1)+(n-1)t
T(n)=1+(n-1)t = O(nt)
//so complexity is :O(nt)//where n is number of element, t is given sum
Answer:
Innovators and Survivors
Explanation:
The innovators are always interested in new information, are open to new ideas and trying out new things, future oriented and excellent problem solving skills. They represent the group with the highest resources according to the VALS segments.
Survivors are the group with the lowest resources. They are risk adverse, and exhibit low motivation towards new ideas or experiences.
Answer:
binary code
Explanation:
correct me if i’m wrong :)
<h2>
Answer:</h2>
10
<h2>
Explanation:</h2>
Specific gravity (also called relative density) is the ratio of the density of an object (or substance) to the density of a reference substance (mostly water). It has no unit and is given by the following;
Specific gravity = 
Specific gravity is also given by the ratio of the weight of the object in air to the loss of weight of the object in water. i.e
Specific gravity =
--------------(* * *)
In this case;
i. The object is the solid which has a weight of 20gf in air.
ii. The loss of weight of the solid in water is the difference between the weight in air (20gf) and the weight in water (18gf).
Therefore the loss of weight is
20gf - 18gf = 2gf
Now substitute these values from (i) and (ii) into equation (* * *) as follows;
Specific gravity = 
Specific gravity = 10
Therefore the specific gravity of the solid is 10
Answer:
find()
Explanation:
When dealing with MongoDB the method that needs to be used in this scenario would be the find() method. This method basically returns all of the records that exist in the collection on which it is called, if no parameter is passed. If you pass a parameter/expression then only the records that match completely the expression will be returned to the user, otherwise nothing is returned. For example, on a database (db) we would call the following
db.find() ... This will return all records
db.find({specific}) ... This will return only the records that match specific.