Is it possible for a connected undirected graph with five vertices and four edges to contain a simple cycle? Explain.
What will be an ideal response?
No. Assume that a simple cycle is possible. A simple cycle must pass through at least 3 vertices. Also, a simple cycle that passes through n vertices must have n edges. The proposed graph has 5 vertices, so a simple cycle could have either 3 vertices and 3 edges or 4 vertices and 4 edges. In the first case, we would have 2 vertices that need to be joined to the cycle by one edge, which is impossible. In the second case, we would have one vertex that is not joined to the cycle, so the graph would be disconnected. Because we have reached a contradiction, our assumption must be false.
You might also like to view...
In the method call string.Trim, string typically is either the Text property of a control or ____.
A. any variable of a character-based type B. the literal string C. the name of your program D. the name of a String variable
Write single C++ statements or portions of statements that do the following:
a) Input integer variable x with cin and >>. b) Input integer variable y with cin and >>. c) Set integer variable i to 1. d) Set integer variable power to 1. e) Multiply variable power by x and assign the result to power. f) Preincrement variable i by 1. g) Determine whether i is less than or equal to y. h) Output integer variable power with cout and <<.
Match the following search features to their descriptions:
I. Search results A. A file that stores search criteria. II. Search criteria B. Items that meet the specific search criteria. III. Search engine C. The terms or conditions that the item being searched for must meet in order for Windows XP to locate it. IV. Search Companion D. A program used to conduct a search of keywords on Web pages. V. Search file E. A feature of Windows XP that helps you to locate files and information.
We wish to have a Checkbook class template where we use DataType for the type of the deposit in the deposit function (instead of the check in the writeCheck function). The client might use a Deposit struct object for DataType, containing the amount to deposit, the date of the deposit, and other information. The deposit function will only add the amount of the deposit to the balance (a data member in the private section), and then store the Deposit object in a data member of the Checkbook class called lastDeposit. The deposit function has a single parameter of DataType (for depositing), which should be passed by:
A. const reference B. value C. copy D. reference