answersLogoWhite

0

📱

Computer Science

Computer Science is the systematic study of algorithmic processes that describe and transform information. It includes the theoretical foundations of information and computation and the practical techniques of applying those foundations to computer systems. Among the many subfields of Computer Science are computer graphics, computer programming, computational complexity theory, and human-computer interaction. Questions about Computer Science, terms such as algorithms and proofs, and methodologies are encouraged in this category.

1,839 Questions

Who invented the first learning AI?

The first learning AI (or first publicly shown one) was, in fact, that of the Norns in Creatures series. The inventor of that AI is Steve Grand.

What is Clutter in image processing?

Scalable Image Processing Methods for Target Acquisition and Tracking also can be noise at digital images.

See related link, maybe can help you.

What is time complexity of genetic algorithm?

The answer to this question depends on several things, the most important of which is the fitness evaluation. I'm going to ignore evaluation- you must determine this for yourself based on your application.

Some of the things the effect the time complexity are:the data structures used to represent the individuals and the population, the genetic operators used, and the implementation of the genetic operators. Roulette wheel selection, for example, can be anywhere from O(n^2) when done naively, to O(log(n)), or even O(n) using something like Vose Alias Algorithm.

The simplest case- roulette wheel selection, point mutation, and one point crossover with both individuals and populations represented by fixed length vectors- has time complexity O(gens * (mut + cross + select)) where gens is the number of generations, mut is the complexity of point mutation (n*m with n the size of the population and m the size of the individuals), cross the time complexity of crossover (n*m again), and select the time complexity of selection (n in the case of an efficiently done roulette wheel).

Therefore, the time complexity of a simple Genetic Algorithm is O(gens*n*m) as this is the dominating term.

I'm sure a much better explanation can be found in the literature.

Script languages in windows are what type of script?

Most scripts written inside of Windows are written using Visual Basic, or a Visual Basic derivative, like Windows Script Host (created for things like logon scripts on networks.)

How do you draw a flow chart to display the prime numbers between 1 to 100?

In order to draw a flow chart to display the prime numbers between 1 and 100, the rules of prime numbers must be implemented. These are that the number is only divisible by itself and one.

What are the advantages of local variables in programming?

1. Local variables cannot be used by other forms.

2. Cannot be used globally.

3. They can slowdown the compiling process.

How many bytes make 2kilobytes?

1 MB (megabyte) has 1000 kb (kilobyte).
1 GB (gigabyte) has 1000 MB (megabyte).

So, 1 GB (gigabyte) has 1000x1000=1,000,000 KB (kilobytes)

Hope This Helps You!

What is relational algebra in DBMS explain with suitable example?

Relational algebra

In order to implement a DBMS, there must exist a set of rules which state how the database system will behave. For instance, somewhere in the DBMS must be a set of statements which indicate than when someone inserts data into a row of a relation, it has the effect which the user expects. One way to specify this is to use words to write an `essay' as to how the DBMS will operate, but words tend to be imprecise and open to interpretation. Instead, relational databases are more usually defined using Relational Algebra.

Relational Algebra is :

  • the formal description of how a relational database operates
  • an interface to the data stored in the database itself
  • the mathematics which underpin SQL operations

Operators in relational algebra are not necessarily the same as SQL operators, even if they have the same name. For example, the SELECT statement exists in SQL, and also exists in relational algebra. These two uses of SELECT are not the same. The DBMS must take whatever SQL statements the user types in and translate them into relational algebra operations before applying them to the database.

Terminology
  • Relation - a set of tuples.
  • Tuple - a collection of attributes which describe some real world entity.
  • Attribute - a real world role played by a named domain.
  • Domain - a set of atomic values.
  • Set - a mathematical definition for a collection of objects which contains no duplicates.
Operators - Write
  • INSERT - provides a list of attribute values for a new tuple in a relation. This operator is the same as SQL.
  • DELETE - provides a condition on the attributes of a relation to determine which tuple(s) to remove from the relation. This operator is the same as SQL.
  • MODIFY - changes the values of one or more attributes in one or more tuples of a relation, as identified by a condition operating on the attributes of the relation. This is equivalent to SQL UPDATE.
Operators - RetrievalThere are two groups of operations:
  • Mathematical set theory based relations:

    UNION, INTERSECTION, DIFFERENCE, and CARTESIAN PRODUCT.

  • Special database operations:

    SELECT (not the same as SQL SELECT), PROJECT, and JOIN.

Relational SELECTSELECT is used to obtain a subset of the tuples of a relation that satisfy a select condition.

For example, find all employees born after 1st Jan 1950: SELECTdob '01/JAN/1950'(employee)

Relational PROJECTThe PROJECT operation is used to select a subset of the attributes of a relation by specifying the names of the required attributes.

For example, to get a list of all employees surnames and employee numbers: PROJECTsurname,empno(employee)

SELECT and PROJECTSELECT and PROJECT can be combined together. For example, to get a list of employee numbers for employees in department number 1:Figure : Mapping select and project Set Operations - semanticsConsider two relations R and S.
  • UNION of R and S

    the union of two relations is a relation that includes all the tuples that are either in R or in S or in both R and S. Duplicate tuples are eliminated.

  • INTERSECTION of R and S

    the intersection of R and S is a relation that includes all tuples that are both in R and S.

  • DIFFERENCE of R and S

    the difference of R and S is the relation that contains all the tuples that are in R but that are not in S.

SET Operations - requirementsFor set operations to function correctly the relations R and S must be union compatible. Two relations are union compatible if
  • they have the same number of attributes
  • the domain of each attribute in column order is the same in both R and S.
UNION ExampleFigure : UNION INTERSECTION ExampleFigure : Intersection DIFFERENCE ExampleFigure : DIFFERENCE CARTESIAN PRODUCTThe Cartesian Product is also an operator which works on two sets. It is sometimes called the CROSS PRODUCT or CROSS JOIN.

It combines the tuples of one relation with all the tuples of the other relation.

CARTESIAN PRODUCT exampleFigure : CARTESIAN PRODUCT JOIN OperatorJOIN is used to combine related tuples from two relations:
  • In its simplest form the JOIN operator is just the cross product of the two relations.
  • As the join becomes more complex, tuples are removed within the cross product to make the result of the join more meaningful.
  • JOIN allows you to evaluate a join condition between the attributes of the relations on which the join is undertaken.

The notation used is R JOINjoin condition S

JOIN ExampleFigure : JOIN Natural JoinInvariably the JOIN involves an equality test, and thus is often described as an equi-join. Such joins result in two attributes in the resulting relation having exactly the same value. A `natural join' will remove the duplicate attribute(s).
  • In most systems a natural join will require that the attributes have the same name to identify the attribute(s) to be used in the join. This may require a renaming mechanism.
  • If you do use natural joins make sure that the relations do not have two attributes with the same name by accident.
OUTER JOINsNotice that much of the data is lost when applying a join to two relations. In some cases this lost data might hold useful information. An outer join retains the information that would have been lost from the tables, replacing missing data with nulls.

There are three forms of the outer join, depending on which data is to be kept.

  • LEFT OUTER JOIN - keep data from the left-hand table
  • RIGHT OUTER JOIN - keep data from the right-hand table
  • FULL OUTER JOIN - keep data from both tables
OUTER JOIN example 1Figure : OUTER JOIN (left/right) OUTER JOIN example 2Figure : OUTER JOIN (full)

What are importance of algorithm?

Algorithms are the foundation of computer Science, it is telling the computer to do the task in the most efficient matter. An algorithm is particularly important in optimizing a computer program, the efficiency of the algorithm usually determines the efficiency of the program as a whole.

Which encryption techniques is incorporated into ip version 6?

There are two versions of internet protocol. The two versions of internet protocol are version 4 and 6. The Encryption techniques incorporated in IPV6 is IPsecurity .

What three features does a loop decision point consist of?

A loop decision point consists of an initial value, a test condition and a set of actions to be performed. In a Java for loop, this is written as for (i = 0 (initial value); i < someValue (test condition); i++ (action performed)).

What is the difference between busy waiting and blocking process?

Busy waiting vs. Blocking

Busy waiting is preferable when:

Scheduling overhead is larger than expected wait time.

Process resources are not needed for another tasks

Schedule -based blocking is inappropriate (e.g in OS kernel)

What key factors affect channel capacity?

The following are the major factors can affect network channel capacity:

1.Data rate-----Bits per second

2.Bandwidth---Cycles per second (Hertz)

3.Error rate

What are examples of line printer?

the character-at-a-time printers are too slow; therefore, these users need line-at-a-time printers. Line printers, or line-at-a-time printers, use special mechanism that can print a whole line at once; they can typically print the range of 1,200 to 6,000 lines per minute.

What is a degenerate binary search tree?

A degenerate binary tree is one where most or all of the nodes contain only one sub node. It is unbalanced and, in the worst case, performance degrades to that of a linked list. If your add node function does not handle rebalancing, then you can easily construct a degenerate tree by feeding it data that is already sorted.

Who proved that a machine was capable of processing a stream of 1s and 0s was capable of solving any problem?

Alan Turing devised the Turing Machine which can be described as a robot which can look at one cell on an infinitely long tape of cells and then, based on what is in that cell and a given program either change the symbol in the cell and/or move the robot to look at the cell to the left/right of the current cell. Alan Turing then went on to prove that it was possible to write a program for this machine that could do the same as the program written for any other computing machine (it might take a very, very, very long time to do it but it would do it).

However, some programs are impossible to write; for example it is impossible to write a program which will tell you if a program given to it as input will terminate or not (which Alan Turing proved); this is known as the halting problem.

What is radix in number system?

The radix refers to the base of a number system: the total number of possible digits. The decimal number system that we all use is base ten, as it has ten distinct digits (0,1,2,3,4,5,6,7,8,9).

Commonly used bases in computing include binary, octal, and hexadecimal, which have two, eight, and sixteen digits, respectively.

What is Instance Recovery?

Brand computers usually has a concealed sector where installed the original operation system. Your so-called Instant Recovery is to pretty much erase everything you have in your computer(virus included) and it loads with the the operation system just like when you first bought it.

Design stack and queue classes with necessary exception handling?

#include<iostream.h>

#include<process.h>

#define SIZE 10

class Stack

{

private:

int a[SIZE];

int top;

public:

Stack();

void push(int);

int pop();

int isEmpty();

int isFull();

void display();

};

Stack::Stack()

{

top=0;

}

int Stack::isEmpty()

{

return (top==0?1:0);

}

int Stack::isFull()

{

return(top==SIZE?1:0);

}

void Stack::push(int i)

{

try

{

if(isFull())

{

throw "Full";

}

else

{

a[top]=i;

top++;

}

}

catch(char *msg)

{

cout<<msg;

}

}

int Stack::pop()

{

try

{

if(isEmpty())

{

throw "Empty";

}

else

{

return(a[--top]);

}

}

catch(char *msg)

{

cout<<msg;

}

return 0;

}

void Stack::display()

{

if(!isEmpty())

{

for(int i=top-1;i>=0;i--)

cout<<a[i]<<endl;

}

}

int main()

{

Stack s;

int ch=1;

int num;

while(ch!=0)

{

cout<<"1. push"<<endl

<<"2. pop"<<endl

<<"3. display"<<endl

<<"0. Exit"<<endl;

cout<<"Enter ur choice :";

cin>>ch;

switch(ch)

{

case 0: exit(1);

case 1: cout<<"Enter the number to push";

cin>>num;

s.push(num);

break;

case 2: cout<<"a number was popped from the stack"<<endl;

s.pop();

break;

case 3: cout<<"The numbers are"<<endl;

s.display();

break;

default:

cout<<"try again";

}

}

return 0;

}

#include<iostream.h>

#define SIZE 10

class Queue

{

private:

int rear;

int front;

int s[SIZE];

public:

Queue()

{

front=0;

rear=-1;

}

void insert(int);

void del();

int isEmpty();

int isFull();

void display();

};

int Queue::isEmpty()

{

return(front>rear?1:0);

}

int Queue::isFull()

{

return(rear==SIZE?1:0);

}

void Queue::insert(int item)

{

try

{

if(isFull())

{

throw "Full";

}

else

{

rear=rear+1;

s[rear]=item;

}

}

catch(char *msg)

{

cout<<msg;

}

}

void Queue::del()

{

int item;

try

{

if(isEmpty())

{

throw "Empty";

}

else

{

item=s[front];

front=front+1;

cout<<"\n DELETED ELEMENT IS %d\n\n"<<item;

}

}

catch(char *msg)

{

cout<<msg;

}

}

void Queue::display()

{

cout<<"\n";

for(int i=front;i<=rear;i++)

{

cout<<s[i]<<"\t";

}

}

int main()

{

int ch;

Queue q;

int item;

do

{

cout<<"\n\n1.INSERTION \n";

cout<<"2.DELETION \n";

cout<<"3.EXIT \n";

cout<<"\nENTER YOUR CHOICE : ";

cin>>ch;

switch(ch)

{

case 1:

cout<<"\n\t INSERTION \n";

cout<<"\nENTER AN ELEMENT : ";

cin>>item;

q.insert(item);

q.display();

break;

case 2:

cout<<"\n\t DELETION \n";

q.del();

q.display();

break;

}

}while(ch!=3);

return 0;

}