- Arts & Humanities
- Communications

Video Case Answers ESS11_REV 2-14

Related documents

Add this document to collection(s)
You can add this document to your study collection(s)
Add this document to saved
You can add this document to your saved list
Suggest us how to improve StudyLib
(For complaints, use another form )
Input it if you want to receive answer
Building-Web-Applications-in-PHP-answer-key | coursera -
by ansh97 PHP Version: Current License: No License
kandi X-RAY | Building-Web-Applications-in-PHP-answer-key Summary
Top functions reviewed by kandi - beta, building-web-applications-in-php-answer-key key features, building-web-applications-in-php-answer-key examples and code snippets, community discussions.
No Community Discussions are available at this moment for Building-Web-Applications-in-PHP-answer-key . Refer to stack overflow page for discussions.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Building-Web-Applications-in-PHP-answer-key
Reuse trending solutions.
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
https://github.com/ansh97/Building-Web-Applications-in-PHP-answer-key.git
gh repo clone ansh97/Building-Web-Applications-in-PHP-answer-key
[email protected]:ansh97/Building-Web-Applications-in-PHP-answer-key.git
Stay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page
Reuse PHP Kits
Consider Popular PHP Libraries
by danielmiessler
Open Weaver – Develop Applications Faster with Open Source
Community and support.
- Privacy policy
© 2023 Open Weaver Inc.

How to Unit Test an Ionic/Angular Application

July 17, 2019 7 min read
Originally published June 08, 2016
Everybody (hopefully) tests their applications in some manner before submitting them to the app stores, and for a lot of people, this will include playing around with the app and trying it on different devices. This is not really an effective testing process, as it is not rigorous and mostly ad-hoc.
Unit tests - and automated tests in general - are a very efficient way to help verify that your codebase is behaving correctly. The general concept of unit tests is that you take small testable chunks (units) of an application's functionality and test that it works as you expect using additional testing code (as opposed to verifying the behaviour manually yourself). Essentially, you write code to automatically test your code for you.
Angular and Ionic are very modular by nature (i.e. most features in an Ionic/Angular application are their own little independent components that work together with other components). This structure already lends itself quite nicely to setting up unit tests. A key part of creating an effective unit test is that we are able to isolate a single bit of functionality, and so if our application is organised and modular, it is going to be easier to do this.
Creating these automated tests obviously requires more development effort, as you need to write tests as well as the code itself. So, why might we want to invest in doing that? The main benefits of adding unit tests (and other types of automated tests) to your application are:
- Documentation - unit tests are set out in such a way that they accurately describe the intended functionality of the application
- Verification - you can have greater confidence that your applications code is behaving the way you intended
- Regression Testing - when you make changes to your application you can be more confident that you haven't broken anything else, and if you have there is a greater chance that you will find out about it, as you can run the same tests against the new code
- Code Quality - it is difficult to write effective tests for poorly designed/organised applications, whereas it is much easier to write tests for well-designed code. Naturally, writing automated tests for your applications will force you into writing good code
- Sleep - you'll be less of a nervous wreck when deploying your application to the app store, because you are going to have a greater degree of confidence that your code works (and the same goes for when you are updating your application)
Arguably, someone like myself who is a freelancer working primarily on small mobile applications won't see as much benefit from setting up automated tests as a large team developing the next Dropbox. But even as a freelancer I've taken on some projects that started out small and well-defined enough but grew into monsters that I spent hours manually testing and fixing for every update. If I had've taken the time back then to learn and set up automated tests my life could have been a lot easier.
If you're looking for a little more background on unit testing in general, take a look at: An Introduction to Unit Testing in AngularJS Applications .
In this tutorial I am going to show you how you can set up simple unit testing with Jasmine and Karma in your Ionic/Angular applications.
Here's what we'll be building:
We're going to start off by setting up a really simple test for one service in the application, but we will likely expand on this in future tutorials.
If you would like a more advanced introduction to testing Ionic/Angular application, I would recommend reading my Test Driven Development in Ionic series or my Elite Ionic (Angular) course.
Before we Get Started
Last updated for Ionic/Angular 4.1.0
Before you go through this tutorial, you should have at least a basic understanding of Ionic/Angular concepts.
If you're not familiar with Ionic/Angular already, I'd recommend reading my beginner tutorials first to get up and running and understand the basic concepts. If you want a much more detailed guide for learning Ionic/Angular, then take a look at Building Mobile Apps with Ionic & Angular .
1. Generate a New Ionic Application
The application we are going to build will simulate a "Magic 8 Ball". Basically, the user will be able to write a question, hit a button, and an answer to their question will be "magically" calculated (i.e. chosen at random).
Let's start off by generating a new application with the following command:
Once that has finished generating make it your current directory:
cd ionic-magic-ball
and then generate the "MagicBall" provider with the following command:
ionic g service services/MagicBall
2. An Introduction to Jasmine
As I mentioned before, we will be using Jasmine and Karma to run the unit tests in our application. In previous versions of Ionic/Angular we had to set this up manually, but fortunately everything we need for automated testing is now included by default.
Jasmine is what we use to create the unit tests, and Karma is what runs them. Let's talk a little bit about how Jasmine works.
Jasmine is a framework for writing code that tests your code. It does that primarily through the following three functions: describe , it , and expect :
- describe() defines a suite (e.g. a "collection") of tests (or "specs")
- it() defines a specific test or "spec", and it lives inside of a suite ( describe() ). This is what defines the expected behaviour of the code you are testing, e.g. "it should do this", "it should do that"
- expect() defines the expected result of a test and lives inside of it()
A skeleton for a test might look something like this:
In this example we have a test suite called "My Service" that contains a test for correctly adding numbers. We use expect to check that the result of 1 + 1 is 2 . To do this we use the toBe() matcher function which is provided by Jasmine. There's a whole range of these methods available for testing different scenarios, for example:
- expect(fn).toThrow(e);
- expect(instance).toBe(instance);
- expect(mixed).toBeDefined();
- expect(mixed).toBeFalsy();
- expect(number).toBeGreaterThan(number);
- expect(number).toBeLessThan(number);
- expect(mixed).toBeNull();
- expect(mixed).toBeTruthy();
- expect(mixed).toBeUndefined();
- expect(array).toContain(member);
- expect(string).toContain(substring);
- expect(mixed).toEqual(mixed);
- expect(mixed).toMatch(pattern);
and if you want to get really advanced you can even define your own custom matchers. The example we have used is just for demonstration and is a bit silly, because we have manually supplied values which will of course pass the test. When we create tests for a real world scenario shortly it should help clarify how you might actually create a unit test for your application.
3. Create and Run a Unit Test
It's finally time to create our first test. You may have heard of the term Test Driven Development . Basically, it's a development process where the automated tests are written first, and then the actual code is written afterward. This helps define requirements and ensures that tests are always created. We're going to have a go at that ourselves (in a very loose sense of the definition of Test Driven Development - we are going to keep things very basic for now). The process goes like this:
- Write a test
- Run the test (it will fail)
- Write your code
- Run the test (it will pass, hopefully)
Modify the file at src/services/magic-ball.service.spec.ts and add the following:
We've set up a really basic test here. We import our MagicBall service and then we have created a test that will always pass. If we were to run npm test now we would see something like this:
NOTE: The other successful tests are due to the default tests included for the home page and root component
Modify src/services/magic-ball.service.spec.ts to reflect the following:
Now we have negated the test using .not (alternatively, we could have used toBeFalsy ), so that it will always fail. Now if we ran npm test (or if you still have the tests running from before) we would see something like this:
One last example before we get into the real test. You can add multiple conditions to each test and if any of them fail the entire test will fail. In this case we have two that will pass, but one that will fail. If we were to run npm test with this we would see the following:
Notice that the error message says Expected 4 to be 5 , which was our failing test - this gives us a good indication of what has gone wrong. Now let's define our real tests.
We have defined three tests here, which:
- Test that the getAnswers method returns a non-empty array
- Test that getRandomAnswer returns a string
- Test that both 'Yes' and 'No' are in the result set
Also, notice that the tests are a bit more complicated now. Since we are using the MagicBall service it needs to be injected into our tests. We do this by using beforeEach (which runs before each of the tests) to create a fresh instance of our magic ball service for each of the tests. We're making use of various matchers here, including toContain and toBeGreaterThan .
If you were to run the tests now using npm test you will just get a whole bunch of errors/failures because we haven't even defined the methods for MagicBallService yet. This is what we want, though. We have some tests that don't pass, now we just need to make them pass.
4. Build the App
Now we're going to build out the rest of the app, which will involve implementing the MagicBall service, and also creating a simple layout to display the answer.
Pretty simple stuff here, we've just manually defined an array with some magic answers, and created a couple of methods to access those.
Modify src/app/home/home.page.html to reflect the following:
This sets up an input field, a button to trigger fetching an answer, and a spot to display the answer. We will also need to set up our class definition to handle fetching and displaying the answers.
Modify src/app/home/home.page.ts to reflect the following:
5. Run the Tests Again
We've finished implementing our MagicBall service now, and if you run it through ionic serve everything seems to be working. However, to make sure, we can now run npm test and we should see something like the following:
All three tests that we have created have passed! If you were to change the answers array so that it didn't include "Yes" or "No" and re-ran the tests, you would see that one fails.
Unit tests are a great way to test your application, but that isn't the end of the story. Whilst individual components in an application might work flawlessly, when working together they might fail. This is where other forms of testing (automated and otherwise) comes in, but we will get to that in future tutorials.
This is also just a very basic example of unit testing, so we will cover some more advanced scenarios in future tutorials as well. Of course, if you would like to dive head first into adding automated tests to your Ionic/Angular applications, check out Elite Ionic (Angular) .
If you enjoyed this article, feel free to share it with others!
Cs6702 graph theory and applications 2 marks questions and answers

Cs6702 graph theory and applications 2 marks questions and answers anna university CSE 7 seventh semester
Recommended


More Related Content
Slideshows for you ( 20 ).

Similar to Cs6702 graph theory and applications 2 marks questions and answers ( 20 )

More from appasami ( 20 )

Recently uploaded ( 20 )

- CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 1 CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS UNIT I INTRODUCTION 1. Define Graph. A graph G = (V, E) consists of a set of objects V={v1, v2, v3, … } called vertices (also called points or nodes) and other set E = {e1, e2, e3, .......} whose elements are called edges (also called lines or arcs). The set V(G) is called the vertex set of G and E(G) is the edge set of G. For example : A graph G is defined by the sets V(G) = {u, v, w, x, y, z} and E(G) = {uv, uw, wx, xy, xz}. A graph with p-vertices and q-edges is called a (p, q) graph. The (1, 0) graph is called trivial graph. 2. Define Simple graph. An edge having the same vertex as its end vertices is called a self-loop. More than one edge associated a given pair of vertices called parallel edges. A graph that has neither self-loops nor parallel edges is called simple graph. 3. Write few problems solved by the applications of graph theory. Konigsberg bridge problem Utilities problem Electrical network problems Seating problems 4. Define incidence, adjacent and degree. When a vertex vi is an end vertex of some edge ej, vi and ej are said to be incident with each other. Two non parallel edges are said to be adjacent if they are incident on a common vertex. The number of edges incident on a vertex vi, with self-loops counted twice, is called the degree (also called valency), d(vi), of the vertex vi. A graph in which all vertices are of equal degree is called regular graph. v1 v2 v3 v4 v5 e5 e4 e3 e2 e6 6 e7 e1Graph G: u v w x y Simple Graph u v w x y Pseudo Graph Graph G: Graph H: u v w x y z Graph G:
- CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 2 The edges e2, e6 and e7 are incident with vertex v4. The edges e2 and e7 are adjacent. The edges e2 and e4 are not adjacent. The vertices v4 and v5 are adjacent. The vertices v1 and v5 are not adjacent. d(v1) = d(v3) = d(v4) = 3. d(v2) = 4. d(v5) = 1. 5. What are finite and infinite graphs? A graph with a finite number off vertices as well as a finite number of edges is called a finite graph; otherwise, it is an infinite graph. 6. Define Isolated and pendent vertex. A vertex having no incident edge is called an isolated vertex. In other words, isolated vertices are vertices with zero degree. A vertex of degree one is called a pendant vertex or an end vertex. The vertices v6 and v7 are isolated vertices. The vertex v5 is a pendant vertex. 7. Define null graph. In a graph G=(V, E), If E is empty (Graph without any edges) Then G is called a null graph. 8. Define Multigraph In a multigraph, no loops are allowed but more than one edge can join two vertices, these edges are called multiple edges or parallel edges and a graph is called multigraph. The edges e5 and e4 are multiple (parallel) edges. v1 v2 v3 v4 v5 e5 e4 e3 e2 e6 6 e7 Graph G: v6 v1 v2 v3 v4 v5 Graph G: v6v7 v1 v2 v3 v4 v5 e5 e4 e3 e2 e6 6 e7 e1Graph G: v6v7 Finite Graphs Infinite Graphs
- CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 3 9. Define complete graph A simple graph G is said to be complete if every vertex in G is connected with every other vertex. i.e., if G contains exactly one edge between each pair of distinct vertices. A complete graph is usually denoted by Kn. It should be noted that Kn has exactly n(n-1)/2 edges. The complete graphs Kn for n = 1, 2, 3, 4, 5 are show in the following Figure. 10. Define Regular graph A graph in which all vertices are of equal degree, is called a regular graph. If the degree of each vertex is r, then the graph is called a regular graph of degree r. 11. Define Cycles The cycle Cn, n ≥3, consists of n vertices v1, v2, ..., vn and edges {v1, v2}, {v2, v3}, ......, {vn – 1, vn}, and {vn, v1}. The cyles c3, c4 and c5 are shown in the following Figures 12. Define Isomorphism. Two graphs G and G' are said to be isomorphic to each other if there is a one-to-one correspondence between their vertices and between their edges such that the incidence relationship is preserved. Correspondence of vertices Correspondence of edges f(a) = v1 f(1) = e1 f(b) = v2 f(2) = e2 f(c) = v3 f(3) = e3 f(d) = v4 f(4) = e4 f(e) = v5 f(5) = e5 Adjacency also preserved. Therefore G and G' are said to be isomorphic. Graph G': 5 v1 a b c 4 1 2 6 d Graph G: e 3 e4 v4 v3 v1 v2 e6e2 e1 e5 6 e3 v5 v1 v2 v3 v1 v2 v3v4 v1 v2 v3 v4 v5
- CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 4 13. What is Subgraph? A graph G' is said to be a subgraph of a graph G, if all the vertices and all the edges of G' are in G, and each edge of G' has the same end vertices in G' as in G. 14. Define Walk, Path and Circuit. A walk is defined as a finite alternating sequence of vertices and edges, beginning and ending with vertices. No edge appears more than once. It is also called as an edge train or a chain. An open walk in which no vertex appears more than once is called path. The number of edges in the path is called length of a path. A closed walk in which no vertex (except initial and final vertex) appears more than once is called a circuit. That is, a circuit is a closed, nonintersecting walk. v1 a v2 b v3 c v3 d v4 e v2 f v5 is a walk. v1 and v5 are terminals of walk. v1 a v2 b v3 d v4 is a path. a v2 b v3 c v3 d v4 e v2 f v5 is not a path. v2 b v3 d v4 e v2 is a circuit. 15. Define connected graph. What is Connectedness? A graph G is said to be connected if there is at least one path between every pair of vertices in G. Otherwise, G is disconnected. 16. Define Components of graph. A disconnected graph consists of two or more connected graphs. Each of these connected subgraphs is called a component. v1 v2 v3 v4 v5 e5 e4 e3 e2 e6 6Disconnected Graph H with 3 components v6 v1 v2 v3 v4 v5 e5 e4 e3 e2 e6 6 e7 e1 Connected Graph G v1 v2 v3 v4 v5 e5 e4 e3 e2 e6 6Disconnected Graph H v6 v3 v2 v4 v5 c d b f h Graph G: v1 ag e v3 v2 v4 v5 c d b f h Open walk v1 ag e v3 v2 v4 v5 c d b f h Path of length 3 v1 ag e v1 v2 v4 v5 v6 e4e3 e2 e6 6 e5 e1Graph G: v3 e4 v1 v2 v5 v6 e4 e2e1Subgraph G' of G: v3 e4
- CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 5 17. Define Euler graph. A path in a graph G is called Euler path if it includes every edges exactly once. Since the path contains every edge exactly once, it is also called Euler trail / Euler line. A closed Euler path is called Euler circuit. A graph which contains an Eulerian circuit is called an Eulerian graph. v4 e1 v1 e2 v3 e3 v1 e4 v2 e5 v4 e6 v3 e7 v4 is an Euler circuit. So the above graph is Euler graph. 18. Define Hamiltonian circuits and paths A Hamiltonian circuit in a connected graph is defined as a closed walk that traverses every vertex of graph G exactly once except starting and terminal vertex. Removal of any one edge from a Hamiltonian circuit generates a path. This path is called Hamiltonian path. 19. Define Tree A tree is a connected graph without any circuits. Trees with 1, 2, 3, and 4 vertices are shown in figure. 20. List out few Properties of trees. 1. There is one and only one path between every pair of vertices in a tree T. 2. In a graph G there is one and only one path between every pair of vertices, G is a tree. 3. A tree with n vertices has n-1 edges. 4. Any connected graph with n vertices has n-1 edges is a tree. 5. A graph is a tree if and only if it is minimally connected. 6. A graph G with n vertices has n-1 edges and no circuits are connected. 21. What is Distance in a tree? In a connected graph G, the distance d(vi , vj) between two of its vertices vi and vj is the length of the shortest path. f v1 v2 v3 v4 v5 a c e h kj Graph G: v6 d b g i v3 v1 v2 v4 e2 e3 e4 e5 e6 6 e1 e7 6
- CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 6 Paths between vertices v6 and v2 are (a, e), (a, c, f), (b, c, e), (b, f), (b, g, h), and (b, g, i, k). The shortest paths between vertices v6 and v2 are (a, e) and (b, f), each of length two. Hence d(v6 , v2) =2 22. Define eccentricity and center. The eccentricity E(v) of a vertex v in a graph G is the distance from v to the vertex farthest from v in G; that is, 𝐸 𝑣 = max 𝑣𝑖∈𝐺 𝑑(𝑣, 𝑣𝑖) A vertex with minimum eccentricity in graph G is called a center of G Distance d(a, b) = 1, d(a, c) =2, d(c, b)=1, and so on. Eccentricity E(a) =2, E(b) =1, E(c) =2, and E(d) =2. Center of G = A vertex with minimum eccentricity in graph G = b. 23. Define distance metric. The function f (x, y) of two variables defines the distance between them. These function must satisfy certain requirements. They are 1. Non-negativity: f (x, y) ≥ 0, and f (x, y) = 0 if and only if x = y. 2. Symmetry: f (x, y) = f (x, y). 3. Triangle inequality: f (x, y) ≤ f (x, z) + f (z, y) for any z. 24. What are the Radius and Diameter in a tree. The eccentricity of a center in a tree is defined as the radius of tree. The length of the longest path in a tree is called the diameter of tree. 25. Define Rooted tree A tree in which one vertex (called the root) is distinguished from all the others is called a rooted tree. In general tree means without any root. They are sometimes called as free trees (non rooted trees). The root is enclosed in a small triangle. All rooted trees with four vertices are shown below. 26. Define Rooted binary tree There is exactly one vertex of degree two (root) and each of remaining vertex of degree one or three. A binary rooted tree is special kind of rooted tree. Thus every binary tree is a rooted tree. A non pendent vertex in a tree is called an internal vertex. Prepared by G. Appasami, Assistant professor, Dr. pauls Engineering College. a c Graph G: b d
- CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 7 UNIT II TREES, CONNECTIVITY & PLANARITY 1. Define Spanning trees. A tree T is said to be a spanning tree of a connected graph G if T is a subgraph of G and T contains all vertices (maximal tree subgraph). 2. Define Branch and chord. An edge in a spanning tree T is called a branch of T. An edge of G is not in a given spanning tree T is called a chord (tie or link). Edge e1 is a branch of T Edge e5 is a chord of T 3. Define complement of tree. If T is a spanning tree of graph G, then the complement of T of G denoted by 𝑇 is the collection of chords. It also called as chord set (tie set or cotree) of T 𝑻 ∪ 𝑻 = 𝑮 4. Define Rank and Nullity: A graph G with n number of vertices, e number of edges, and k number of components with the following constraints 𝑛 − 𝑘 ≥ 0 and 𝑒 − 𝑛 + 𝑘 ≥ 0. Rank 𝑟 = 𝑛 − 𝑘 Nullity 𝜇 = 𝑒 − 𝑛 + 𝑘 (Nullity also called as Cyclomatic number or first betti number) Rank of G = number of branches in any spanning tree of G Nullity of G = number of chords in G Rank + Nullity = 𝑒 = number of edges in G 5. How Fundamental circuits created? Addition of an edge between any two vertices of a tree creates a circuit. This is because there already exists a path between any two vertices of a tree. v3 v1 v2 v4 e2 e3 e4 e5 e6 6 e1 e7 6 v3 v1 v2 v4 e3 e4 e1 Graph G: Spanning Tree T: v3 v1 v2 v4 e2 e5 e6 6e7 6 𝑻:Complement of Tree T v3 v1 v2 v4 e2 e3 e4 e5 e6 6 e1 e7 6 v3 v1 v2 v4 e3 e4 e1 Graph G: Spanning Tree T: v3 v1 v2 v4 e2 e3 e4 e5 e6 6 e1 e7 6 v3 v1 v2 v4 e3 e4 e1 Graph G: Spanning Tree T:
- CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 8 6. Define Spanning trees in a weighted graph A spanning tree in a graph G is a minimal subgraph connecting all the vertices of G. If G is a weighted graph, then the weight of a spanning tree T of G is defined as the sum of the weights of all the branches in T. A spanning tree with the smallest weight in a weighted graph is called a shortest spanning tree (shortest-distance spanning tree or minimal spanning tree). 7. Define degree-constrained shortest spanning tree. A shortest spanning tree T for a weighted connected graph G with a constraint 𝑑(𝑣i) ≤ 𝑘 for all vertices in T. for k=2, the tree will be Hamiltonian path. 8. Define cut sets and give example. In a connected graph G, a cut-set is a set of edges whose removal from G leave the graph G disconnected. Possible cut sets are {a, c, d, f}, {a, b, e, f}, {a, b, g}, {d, h, f}, {k}, and so on. {a, c, h, d} is not a cut set, because its proper subset {a, c, h} is a cut set. {g, h} is not a cut set. A minimal set of edges in a connected graph whose removal reduces the rank by one is called minimal cut set (simple cut-set or cocycle). Every edge of a tree is a cut set. 9. Write the Properties of cut set Every cut-set in a connected graph G must contain at least one branch of every spanning tree of G. In a connected graph G, any minimal set of edges containing at least one branch of every spanning tree of G is a cut-set. Every circuit has an even number of edges in common with any cut set. 10. Define Fundamental circuits Adding just one edge to a spanning tree will create a cycle; such a cycle is called a fundamental cycle (Fundamental circuits). There is a distinct fundamental cycle for each edge; thus, there is a one-to-one correspondence between fundamental cycles and edges not in the spanning tree. For a connected graph with V vertices, any spanning tree will have V − 1 edges, and thus, a graph of E edges and one of its spanning trees will have E − V + 1 fundamental cycles. 11. Define Fundamental cut sets Dual to the notion of a fundamental cycle is the notion of a fundamental cutset. By deleting just one edge of the spanning tree, the vertices are partitioned into two disjoint sets. The fundamental cutset is defined as the set of edges that must be removed from the graph G to accomplish the same partition. Thus, each spanning tree defines a set of V − 1 fundamental cutsets, one for each edge of the spanning tree. e d cb v1 v3 v2 v5 v4 g a h Graph G: v6 k f e b v1 v3 v2 v5 v4 g hv6 k Disconnected graph G with 2 components after removing cut set {a, c, d, f}
- CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 9 12. Define edge Connectivity. Each cut-set of a connected graph G consists of certain number of edges. The number of edges in the smallest cut-set is defined as the edge Connectivity of G. The edge Connectivity of a connected graph G is defined as the minimum number of edges whose removal reduces the rank of graph by one. The edge Connectivity of a tree is one. The edge Connectivity of the above graph G is three. 13. Define vertex Connectivity The vertex Connectivity of a connected graph G is defined as the minimum number of vertices whose removal from G leaves the remaining graph disconnected. The vertex Connectivity of a tree is one. The vertex Connectivity of the above graph G is one. 14. Define separable and non-separable graph. A connected graph is said to be separable graph if its vertex connectivity is one. All other connected graphs are called non-separable graph. 15. Define articulation point. In a separable graph a vertex whose removal disconnects the graph is called a cut-vertex, a cut- node, or an articulation point. v1 is an articulation point. 16. What is Network flows A flow network (also known as a transportation network) is a graph where each edge has a capacity and each edge receives a flow. The amount of flow on an edge cannot exceed the capacity of the edge. 17. Define max-flow and min-cut theorem (equation). The maximum flow between two vertices a and b in a flow network is equal to the minimum of the capacities of all cut-sets with respect to a and b. v1 v1 v2 Separable Graph G: Non-Separable Graph H: v1 v1
- CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 10 The max. flow between two vertices = Min. of the capacities of all cut-sets. 18. Define component (or block) of graph. A separable graph consists of two or more non separable subgraphs. Each of the largest nonseparable is called a block (or component). The above graph has 5 blocks. 19. Define 1-Isomorphism A graph G1 was 1-Isomorphic to graph G2 if the blocks of G1 were isomorphic to the blocks of G2. Two graphs G1 and G2 are said to be 1-Isomorphic if they become isomorphic to each other under repeated application of the following operation. Operation 1: “Split” a cut-vertex into two vertices to produce two disjoint subgraphs. Graph G1: Graph G2: Graph G1 is 1-Isomorphism with Graph G2. 20. Define 2-Isomorphism Two graphs G1 and G2 are said to be 2-Isomorphic if they become isomorphic after undergoing operation 1 or operation 2, or both operations any number of times. Operation 1: “Split” a cut-vertex into two vertices to produce two disjoint subgraphs. Operation 2: “Split” the vertex x into x1 and x2 and the vertex y into y1 and y2 such that G is split into g1 and g2. Let vertices x1 and y1 go with g1 and vertices x2 and y2 go with g2. Now rejoin the graphs g1 and g2 by merging x1 with y2 and x2 with y1. 21. Briefly explain Combinational and geometric graphs An abstract graph G can be defined as G = (𝑉, 𝐸, 𝛹) Where the set V consists of five objects named a, b, c, d, and e, that is, 𝑉 = { a, b, c, d, e } and the set E consist of seven objects named 1, 2, 3, 4, 5, 6, and 7, that is, 𝐸 = { 1, 2, 3, 4, 5, 6, 7}, and the relationship between the two sets is defined by the mapping 𝛹, which consist of
- CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 11 𝛹= [1(a, c), 2(c, d) , 3(a, d) , 4(a, b) , 5(b, d) , 6(d, e) , 7(b, e) ]. Here the symbol 1(a, c), says that object 1 from set E is mapped onto the pair (a, c) of objects from set V. This combinatorial abstract object G can also be represented by means of a geometric figure. The figure is one such geometric representation of this graph G. Any graph can be geometrically represented by means of such configuration in three dimensional Euclidian space. 22. Distinguish between Planar and non-planar graphs A graph G is said to be planar if there exists some geometric representation of G which can be drawn on a plan such that no two of its edges intersect. A graph that cannot be drawn on a plan without crossover its edges is called non-planar. 23. Define embedding graph. A drawing of a geometric representation of a graph on any surface such that no edges intersect is called embedding. 24. Define region in graph. In any planar graph, drawn with no intersections, the edges divide the planes into different regions (windows, faces, or meshes). The regions enclosed by the planar graph are called interior faces of the graph. The region surrounding the planar graph is called the exterior (or infinite or unbounded) face of the graph. Prepared by G. Appasami, Assistant professor, Dr. pauls Engineering College. Graph G: Embedded Graph G: Planar Graph G: Non-planar Graph H:
- CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 12 The graph has 6 regions. 25. Why the graph is embedding on sphere. To eliminate the distinction between finite and infinite regions, a planar graph is often embedded in the surface of sphere. This is done by stereographic projection.
- CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 13 UNIT V GENERATING FUNCTIONS Define Generating function. A generating function describes an infinite sequence of numbers (an) by treating them like the coefficients of a series expansion. The sum of this infinite series is the generating function. Unlike an ordinary series, this formal series is allowed to diverge, meaning that the generating function is not always a true function and the "variable" is actually an indeterminate. The generating function for 1, 1, 1, 1, 1, 1, 1, 1, 1, ..., whose ordinary generating function is (𝑥) 𝑛 = 1 1 − 𝑥 ∞ 𝑛=0 The generating function for the geometric sequence 1, a, a2 , a3 , ... for any constant a: (𝒂𝒙) 𝒏 = 𝟏 𝟏 − 𝒂𝒙 ∞ 𝒏=𝟎 What is Partitions of integer? Partitioning a positive n into positive summands and seeking the number of such partitions without regard to order is called Partitions of integer. This number is denoted by p(n). For example P(1) = 1: 1 P(2) = 2: 2 = 1 + 1 P(3) = 3: 3 = 2 +1 = 1 + 1 +1 P(4) = 5: 4 = 3 + 1 = 2 + 2 = 2 + 1 + 1 = 1 + 1 + 1 + 1 P(5) = 7: 5 = 4 + 1 = 3 + 2 = 3 + 1 + 1 = 2 + 2 + 1 = 2 + 1 + 1+ 1 = 1 + 1 + 1 + 1 + 1 Define Exponential generating function For a sequence a0, a1, a2, a3,, … of real numbers. 𝑓 𝑥 = 𝑎0 + 𝑎1 𝑥 + 𝑎2 𝑥2 2! + 𝑎3 𝑥3 3! + ⋯ = 𝒂𝒊 𝒙𝒊 𝒊! 𝒊∞ 𝒊=𝟎 is called the exponential generating function for the given sequence. Define Maclaurin series expansion of ex and e-x . 𝑒 𝑥 = 1 + 𝑥 + 𝑥2 2! + 𝑥3 3! + 𝑥4 4! + ⋯ 𝑒−𝑥 = 1 − 𝑥 + 𝑥2 2! − 𝑥3 3! + 𝑥4 4! − ⋯ Adding these two series together, we get, 𝑒 𝑥 + 𝑒−𝑥 = 2(1 + 𝑥2 2! + 𝑥4 4! + ⋯ ) 𝑒 𝑥 + 𝑒−𝑥 2 = 1 + 𝑥2 2! + 𝑥4 4! + ⋯ Define Summation operator Generating function for a sequence a0, a0 + a1, a0 + a1 + a2, a0 + a1 + a2 + a3,, … . For (𝑥) = 𝑎0 + 𝑎1 𝑥 + 𝑎2 𝑥2 + 𝑎3 𝑥3 + ⋯ ,, consider the function f(x)/(1-x) 𝑓(𝑥) 1 − 𝑥 = 𝑓 𝑥 . 1 1 − 𝑥 = 𝑎0 + 𝑎1 𝑥 + 𝑎2 𝑥2 + 𝑎3 𝑥3 + ⋯ [1 + 𝑥 + 𝑥2 + 𝑥3 + ⋯ ] = 𝑎0 + (𝑎0 + 𝑎1)𝑥 + 𝑎0 + 𝑎1+𝑎2 𝑥2 + + 𝑎0 + 𝑎1+𝑎2 + 𝑎3 𝑥3 + ⋯ So f(x)/(1-x) generates the sequence of sums a0, a0 + a1, a0 + a1 + a2, a0 + a1 + a2 + a3,, 1/(1-x) is called the summation operator.
- CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 14 Recurrence relations A recurrence relation is an equation that recursively defines a sequence or multidimensional array of values, once one or more initial terms are given: each further term of the sequence or array is defined as a function of the preceding terms. The term difference equation sometimes (and for the purposes of this article) refers to a specific type of recurrence relation. However, "difference equation" is frequently used to refer to any recurrence relation. Fibonacci numbers The recurrence satisfied by the Fibonacci numbers is the archetype of a homogeneous linear recurrence relation with constant coefficients (see below). The Fibonacci sequence is defined using the recurrence Fn = Fn-1 + Fn-2 with seed values F0 = 0 and F1 = 1 We obtain the sequence of Fibonacci numbers, which begins 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... First order linear recurrence relation The general form of First order linear homogeneous recurrence relation can be written as an+1 = d an, n ≥ 0, where d is a constant. The relation is first order since an+1 depends on an. a0 or a1 are called boundary conditions. Second order recurrence relation
- CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 15 Non-homogeneous recurrence relations
What are the test cases for travelling application?

Want this question answered?
Be notified when an answer is posted
ti5jroihytoph6tjifocknhj4cc
Add your answer:.

How do you write a test cases in software testing?
With the Test Cases Module in test management, you can: Organize test cases into folders and sub folders Add and Edit test cases manually Import test cases from Excel and Jira Execute test cases for ad-hoc testing View status of individual test cases Link relevant requirements to test cases
Difference between test-case and test-suite and test data?
A test case is a set of conditions to determine whether an application is working properly. A test suite is a group of test cases merged together to get an overall outcome. Test data is used to analyze results.
What is the importance of software testing?
Software testing is a method of uncovering defects in a software program or application. In general test cases are designed based on the expected behavior of the program or applications. The test cases are executed using the program, or application, and the actual behavior is observed. If the actual behavior does not match the expected behavior then a defect is said to exist. There are many methods available to design test cases for testing software. Software testing is one of many quality assurance methods used to assess the quality of a program or application. Answer by John MM, SoftwareTesting.net
What are the four parts of the application for naturalization?
The four parts of the application for naturalization include oral test, reading test, writing test, and the Civics test.
Test cases for testing a pocket calculator?
Write 3 test cases for testing a pocket calculator.
How do you get to the PS3 test on royal farms application?
what is pass 3 test
What is the practical application of Hellers test?
This test checks for albumin in the urine
Is assembly test also known as string test?
Yes....String Test=application Integration test=assembly test.
What is the use of test-cases in software testing tools?
A Test case is a particular set of instructions designed to test one particular aspect of an software product under test. A test case may cover a requirement or a particular feature of an application. A test case usually consists of a description, as set of steps to execute the test and details of expected results. On completion of the test case the expected results are compared against the actual results to determine if the test is a pass or a fail.In software testing tools a test case is usually defined, and multiple test cases grouped to create a test script. Software testing tools are then used to manage the complex relationship between test cases, test scripts and test results. Software testing tools may go as far as implementing automated test cases or they can just be used to track manual test cases. The term Test management tools is used to describe the type of software testing tools that are concerned with the process of managing test cases.
What is Practical application of Benedict's tests?
The practical application of Benedict's test is to test a substance for sugar. This could be used to test the sugar content of anything (saliva, urine, etc...).
Does Fry's Electronics Drug test employees?
Yes, their application refers to a 'test for substance abuse;' it is a urinalysis test for "abusive levels of any chemical substance." The vague statement is from the application. Unsure what type of urine test it is.
How do you test algorithm?
By preparing test cases we can test an algorithm. The algorithm is tested with each test case.

Top Categories


IMAGES
VIDEO
COMMENTS
What are the answers on case application by Stephen Robbins? Anu-ano sining ang kilala sa lalawigan ng Tarlac? Why tip of stalagmometer flattened? Why did Bea Arthur wear neck hiding scarves and high neck collared blouses on Maude and Golden Girls?
This answer is: Helpful. Add your answer:Earn +. Registered users can ask questions, leave comments, and earn points for submitting new answers
Essentials of MIS 11 Video Cases ESSENTIALS OF MANAGEMENT INFORMATION SYSTEMS: MANAGING THE DIGITAL FIRM, 11 T H EDITION KENNETH LAUDON AND JANE LAUDON Azimuth Interactive, Inc. GPS built into the unit to help
Building-Web-Applications-in-PHP-answer-key has 7 bugs (0 blocker, 0 critical, 7 major, 0 minor) and 13 code smells
Everybody (hopefully) tests their applications in some manner before submitting them to the app stores, and for a lot of people, this will include playing around with the app and trying it on different devices
2. CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 2 The edges e2, e6 and e7 are incident with vertex v4. CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 3 9. Define
Answer to Solved Case Application #2 Building a Better Boss. The project, dubbed Project Oxygen, examined some 100 variables and ultimately identified eight ... Provide an unambiguous vision of the future
When do hummingbirds migrate? How much caffeine can you drink if you are pregnant? Are salamanders lizards?