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

What do you mean by double stack?

A double stack is simply two single stacks. (A triple stack is three, etc. And no, we are not talking pancakes or hamburgers. :-)>)

Often, the topic of double stacks comes up in compiler design, where you use one stack for operands and the other stack for operators, during the processing of an infix expression into a postfix expression.

Do not confuse these "extra" stacks with the primary stack provided by your compiler for passing arguments and return details. These "extra" stacks are usually coded explicitly, rather than implicitly, though some libraries such as STL can make it easier to do so.

What is a scrip system?

Scripis a term for any substitute for currency which is not legal tender and is often a form of credit. Scrips were created as company payment of employees and also as a means of payment in times where regular money is unavailable, such as remote coal towns, military bases, ships on long voyages, or occupied countries in war time. Other forms of scrip include subway tokens, IOUs, arcade tokens and tickets, and "points" on some websites.

http://en.wikipedia.org/wiki/Scrip

How many kigabites are in one gigabite?

I presume you're asking "How many kilobytes in a gigabyte?"

There are approximately 1 million kilobytes in a gigabyte.

What is the meaning 'load balancing' in computer science?

Load balancing is a term used in the field of parallel programming, in which multiple CPUs (or even multiple different machines) will be doing work at the same time. Load balancing itself refers to allotting each CPU an amount of work (a 'load') which will ensure that they all finish processing at the same time.

The whole point of parallel processing is to reduce the amount of time it takes to perform a task. Without load balancing techniques, we may have one CPU doing 90% of the work and another doing only 10%. This does not give us a good speedup.

An ideal load balancing algorithm will distribute (100/N)% of the work over N processors.

What is function of a scanner?

A scanner converts photos, documents, etc. to digital form for copying, transmitting or storing.

Which is a type of data?

There are several different types of data. Some include qualitative and quantitative. Qualitative is data that is not numeric and quantitative data is numerical.

What is the body of a loop?

The "body" of a loop is the code being executed on each iteration.

while(x < 10) {

// beginning of body
doStuff();
printStuff();
doOtherStuff();
++x;
// end of body
}

How do you calculate time complexity for insertion sort?

1.for j = 2 to length[A] c1 n

2. do key ¬ A[j] c2 n-1

3. //insert A[j] to sorted sequence A[1..j-1] 0 n-1

4. i ¬ j-1 c4 n-1

5. while i >0 and A[i]>key c5 Sum (j=2->n) tj

6. do A[i+1] ¬ A[i] c6 Sum (j=2->n) (tj -1)

7. i ¬ i-1 c7 Sum (j=2->n) (tj -1)

8. A[i+1] ¬ key c8 n -1

Sum j=2->n tj evaluates to (n(n+1)/2)-1 and j=2->(tj-1) evaluates to n(n-1)/2

thus the highest order term after droping constants becomes n2 thus the complexity is n2

What is a bar gragh?

.)A graph consisting of parallel, usually vertical bars or rectangles with lengths proportional to the frequency with which specified quantities occur in a set of data. Also called bar chart

What degree should I choose Engineering or Computer Science I have the opportunity to go for free to a school that doesnt offer Engineering but does offer Computer Science what should I do?

The best course to study is the one that leads to your overall career goals and objectives. Thus, I would imagine you do not have anything specific at this time. So many individuals enroll in college programs without a specific goal in mind. As such, many become miserable in their work which is not good for them, or their employer. If you want to be successful in your work and personal life, carefully consider the following.

To be successful in your work, you must acquire a vision. A vision is a clearly articulated picture of the future you intend to create for yourself. In other words, it's a dream. However, if the dream does not have direction, it will always remain a dream and will never become a reality for you. That vision should create a passion within you, a love for what you do and the benefit it will bring to others as well as yourself. Make sure the vision is specific, measurable, attainable, realistic, and tangible. Let us look at this closer. When you believe you have chosen an appropriate career goal, look at it in SMART fashion as follows. * Specific - Make sure your career goal is very specific. For example, "I would like to be a teacher," is not specific. "I would like to be a high school biology teacher in New Jersey (USA) in an urban school by 2012" is. * Measurable - Make sure you can measure your progress. How will I know I am progressing in the right direction? This is where the development of short-term objectives comes in (discussed below). You will know you are on the right path as you accomplish each short -term objective. * Achievable - Is the goal achievable considering my current life situation and circumstances? * Realistic - Is what I want to do really realistic. For example, "I would like to be a middle weight boxing champion, and I am 63 years old." That is not realistic. * Tangible - What will I - specifically - have at the end? What will I be (exactly)? It must be very specific. Once you acquire that vision your path will become clear. Still, you will need a mentor, counselor, or coach who will be able to help you develop a road map embedded with short-term objectives leading to your overall career overall goals and objectives. The achievement of short-term objectives will indicate you are moving in the correct direction, and will also give you energy and excitement to carry on towards your overall career goal. It will take some research, but you most likely have some ideas already. Follow them through, look at the nature of the field, the everyday routine, the required education, the salary, the occupational demand and the related fields. When a career sparks an interest, try to shadow an individual who is actually doing what you think you might like to do. You can pick up valuable information this way. Thus, the following. * Acquire the will to change circumstances. * Acquire the vision (dream). * Develop a road-map embedded with short-term objectives leading to your overall goal and objective. * Just do it and do not let go until it becomes a reality.

Algorithm for conversion from prefix to infix?

The belt-and-braces technique is easy enough:

>

> prefix_to_infix(stream, stack)

> if stack is not empty

> pop a node off the stack

> if this node represents an operator

> write an opening parenthesis to stream

> prefix_to_infix(stream, stack)

> write operator to stream

> prefix_to_infix(stream, stack)

> write a closing parenthesis to stream

> else

> write value to stream

> endif

> endif

> endfunc

Define the languages accepted by NFA and DFA?

In general, finite state machines can model regular grammars.

Deterministic finite automata can represent deterministic context-free grammars.

Non-deterministic finite automata can represent context-free grammars.

What is the conclusion of Keystroke dynamics as a biometric for authentication?

It is behavioral biometric. It is used to describe how an individualaddresses the keys on the keyboard. As biometrics go, it has a great price to performance ratio, as it is software only, requiring no special hardware. Purely based on accuracy, it is slightly less accurate than low end fingerprint readers, when comparing crossover error rate.

How do you calculate time complexity for Quicksort?

First, we want to set up a recurrence relation. If we consider the best-case for the quicksort, that is, that each partition splits the collection in 1/2 (not a valid assumption), then (look at a recursive quicksort algorithm):

The partition requires about n comparisons. It is then left to sort 2 collections of size n/2. So:

T(n) = 2*T(n/2) + n

Use repeated substitution, or the "master theorem" or whatever it's called, a generalisation of closed forms, or draw a tree, or use the accounting method, or guess at the answer, prove it by induction.

Now, we need to consider the worst case. The partition still costs the same (about n comparisons), but the partition didn't yield 2 nice-sized sub-collections to sort. Instead, we have a single sub-array to sort, of size n-1 . So now the recurrence relation looks like:

T(n) = T(n-1) + n

Solve this in your favorite way.

Now, on average, how good is your algorithm? That depends on how well you choose your pivot. You can do some reasoning, or, you can run some nice experiments.

Have fun.

What is the worst case and best case for binary search?

The best case for a binary search is finding the target item on the first look into the data structure, so O(1).

The worst case for a binary search is searching for an item which is not in the data. In this case, each time the algorithm did not find the target, it would eliminate half the list to search through, so O(log n).

Which degree is better between applied mathematics computer science and statistics and which one is the second one?

It's not that one is better than the other, it's just that they are different. The question is, "which one is better for you?" The first thing you must do is acquire a vision for yourself; a specific and clearly articulated picture of the future you intend to create for yourself. This vision should be based on a passion for what you want to do, and the benefit it brings to others as well as yourself. Once you acquire that vision your path will become clear. Each of these fields have possibilities, but only passion will lead to success. Passion is key to success.

Difference between DFA and NFA?

Hi,

1. DFA cannot use empty string transition and NFS can use empty string transition.

2. It use one machine but it use multiple machine.

3. DFA is one state transition but NFA react according to some symbol.

Explain about primary key super key candidate key alternate key composite key foreign key?

KEYS IN SQL

* Alternate key - An alternate key is any candidate key which is not selected to be the primary key

* Candidate key - A candidate key is a field or combination of fields that can act as a primary key field for that table to uniquely identify each record in that table.

For Eg:

The table:

Emloyee(Name,Address,Ssn,Employee_Idprimary_key,Phone_ext)

In the above example Ssn no. and employee identity are ccandidate keys.

* Compound key - compound key (also called a composite key or concatenated key) is a key that consists of 2 or more attributes.

* Primary key - a primary key is a value that can be used to identify a unique row in a table. Attributes are associated with it. Examples of primary keys are Social Security numbers (associated to a specific person) or ISBNs (associated to a specific book).

In the relational model of data, a primary key is a candidate key chosen as the main method of uniquely identifying a tuple in a relation.

For Eg:

Emloyee(Name,Address,Ssn,Employee_Idprimary_key,Phone_ext)

* Superkey - A superkey is defined in the relational model as a set of attributes of a relation variable (relvar) for which it holds that in all relations assigned to that variable there are no two distinct tuples (rows) that have the same values for the attributes in this set. Equivalently a superkey can also be defined as a set of attributes of a relvar upon which all attributes of the relvar are functionally dependent.

For Eg:

Emloyee(Name,Address,Ssn,Employee_Idprimary_key,Phone_ext)

All the above are super keys.

* Foreign key - a foreign key (FK) is a field or group of fields in a database record that points to a key field or group of fields forming a key of another database record in some (usually different) table. Usually a foreign key in one table refers to the primary key (PK) of another table. This way references can be made to link information together and it is an essential part of database normalization.

For Eg:

For a Student....

School(Name,Address,Phone,School_Reg_noprimary_key

How to write an actual algorithm for inserting an element in a linked list?

Insert newNode into a linked list after targetNode

Node currentNode = root

while currentNode != targetNode

currentNode = currentNode.next

newNode.next = currentNode.next

currentNode.next = newNode

What is Functional dependency and normalization for database?

A functional dependency occurs between two attributes in a database, A and B, if there exists a relationship such that for each value of A there is only one corresponding value of B (A -> B). This can be extended to a functional dependency where A may be a set of tuples (x, y, z) that correspond to a single value B ([x, y, z] -> B). In simple mathematical terms the functional dependency must pass the vertical line test for proper functions. Normalization of a relational database means that the relations (tables) in the database conform to a set of rules for a certain normal form (First - Sixth Normal Form [1-6NF] and/or Boyce-Codd Normal Form [BCNF]). The higher the normal form of a table the less vulnerable it is to data inconsistency and data anomalies formed during updates, inserts, and deletes. Normalization often reduces data redundancy in a database which reduces data inconsistency and anomaly risks. Normalizing a database requires analysis of the closure of the set of functional dependencies to ensure that the set complies with the rules for the given normal form. If the table does not comply with the rules then the table is split following specific procedures to achieve the desired normal form. Every table in a database has a normal form and to make a statement that a database is in a certain normal form (ex. 3NF) means that every table complies with the rules for 3NF.

What do you mean by logical configuration?

pls, i want you to give me a full meaning of logical configuration