Answer:
thanks my dude I needed it
Answer:
Recursion is a process of defining a method that calls itself repeatedly
Explanation:
Recursion is a basic programming technique of defining a method that calls itself repeatedly.
One practical example is using recursion to find the factorial of a number.
Consider the following java code below, it uses recursion to solve for the factorial of a number.
class Main {
public static void main (String[] args) {
System.out.println("Factorial of 3 is " + factorial(3));
System.out.println("Factorial of 5 is " + factorial(5));
System.out.println("Factorial of 7 is " + factorial(7));
}
//the factorial method uses recursion to find the factorial of the
// parameter of the integer pass into it
private static int factorial(int n) {
int result;
if ( n ==1) return 1;
result = factorial(n-1) * n;
return result;
}
}
Explanation:
a . Regular language -
Uses are as follows -
- matching the regular expression patterns , like the Unix grep .
- patterns search and replace operations .
- programming languages for the Lexical analysis in the compilation phase .
b. Context Free Language -
Uses are as follows -
- match the count of one symbol with another symbol .
- Match a symbol with another symbol .
- submit one symbol with string made of other symbols recursively .
c. NP-Completeness -
Uses are as follows -
- used for Weighted Model Counting
- Used for Integer Programming
- used for Boolean Satisfiability testing
d. Decidability -
Uses are as follows -
- Team games with incomplete information are undecidable.
- Infinite chess (with limitations on rules and game pieces) is decidable.
Video input devices are used to scan images or videos from the outside world to the computer. The information can be stored in a multitude of formats depending on the user's requirements. Examples of types of video input devices include: digital camera. Digital camcorder.