(5/5)

In set theory, a set intuitively designates a collection of objects (the elements of the set).

Example: A set of natural inties is rated N: No.0; 1; 2; 3; . . .

While a subset of N can be small (cardinal) and contain very large numbers,it is hollow in the sense that only few numbers belong to it.

For example SN is a hollow set of 5 elements..

We will use in this part the chained lists to represent seeded whole numbers. The most practical method in this case is to represent a hollow set by u double-chained list of its elements, pointed by a left pointer PGauche and a right pointer PDroite. The itemsare placplaced on the list in ascending order. .

An item on the doubly chained list will therefore be characterized by the following information:

- A pointer on the left element;
- The value of the item;
- A pointer on the rightelement.

- After defining, in C, the EnsCreux data structure representing a hollow set, write a program allowing:
- Inserting an item in accordance with the growing order of the list;;
- Deleting an item based on its value;
- The display of the elements of the set in ascending order and respecting the following display format " 2; 37 ; 55 ; 231 ; 9999";
- The display ofelements of the set inthe déascending order;
- The destruction of the whole.

- Knowing that the elements appear only once in a set.
- Write the cardinal function returning the number of items in a set (our list);
- Writing the function belongs to return 1 if an x element belongs to a set and 0 if not;
- Write the union function flipping the whole union of two sets entered into parameters;
- Definition: A C-unit of two sets A and B contains all the elements of A and all the elements of B without repetition.

(5/5)

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Get Free Quote!

256 Experts Online