Questions
Which of these statements are true and which are false? (a) If f(n) = Θ(g(n)) and...

Which of these statements are true and which are false?

(a) If f(n) = Θ(g(n)) and g(n) = Θ(h(n)), then h(n) = Θ(f(n))  

(b) If f(n) = O(g(n)) and g(n) = O(h(n)), then h(n) = Ω(f(n))

(c) If f(n) = O(g(n)) and g(n) = O(f(n)) then f(n) = g(n)                                                     

(d) 100n = Ω(n2)    

(e) In the merge-sort execution tree, roughly the same amount of work is done at each level of the tree.  

(f) An algorithm is randomized if its behavior is determined in part by values produced by a random-number generator.   

(g) Quicksort can be used as the auxiliary sorting routine in radix sort, because it operates in place.   

In: Computer Science

Suppose you want to store line segments in an R-tree. If a line segment is not...

Suppose you want to store line segments in an R-tree. If a line segment is not parallel to the axes, the bounding box for it can be large, containing a large empty area.

Describe the effect on performance of having large bounding boxes on queries that ask for line segments intersecting a given region.


Briefly describe a technique to improve performance for such queries and give an example of its benefit. Hint: You can divide segments into smaller pieces.


In: Computer Science

PYTHON Write a program for an event organizer. The code can be as short as 7...

PYTHON

Write a program for an event organizer. The code can be as short as 7 lines; 9 lines are good enough!

a) Request the organizer to enter a participant’s full name in a single input. The input can take two different formats: i. l_name, f_name [1.5 pts] ii. f_name l_name [1.5 pts] b) Print a customized greeting message using the first name, regardless of the formats: “Dear f_name, welcome to the party!” with only the 1 st letter of f_name in upper case.

Hint 1: Try to work on one form, at a time. After figuring out how to do both, add an if statement.

Hint 2: Just need to use in, len(), .find() and, of course, input().

In: Computer Science

Write a program that read an array consists of 4 rows and 4 columns, then computes...

Write a program that read an array consists of 4 rows and 4 columns, then computes and print the sum of the elements above and below the main diagonal. (WITH C++)

In: Computer Science

car.txt 0001|Mercury|LeSabre|2005|Brown|11000|2019-09-01 0002|Chevrolet|Aveo|2013|Blue|12000|2019-09-02 0003|Datsun|240Z|1979|Orange|13000|2019-09-03 0004|Ford|Galaxie|1964|Black|14000|2019-09-04 0005|Porsche|Boxster|2014|Green|15000|2019-09-05 0006|Honda

car.txt

0001|Mercury|LeSabre|2005|Brown|11000|2019-09-01
0002|Chevrolet|Aveo|2013|Blue|12000|2019-09-02
0003|Datsun|240Z|1979|Orange|13000|2019-09-03
0004|Ford|Galaxie|1964|Black|14000|2019-09-04
0005|Porsche|Boxster|2014|Green|15000|2019-09-05
0006|Honda|Insight|2007|Silver|16000|2019-09-06

1) Design and implement a class of "car" with constructor and destructor, with member variable for each field, and method for get and set each field. (2) Read the file (car.txt) to instantiate each object for each record read from the file. (3) After the file input is done, then display each object to the console.

Car List

Record #1
(1) carID=0001
(2) carManufacturer=Mercury
(3) carModel=LeSabre
(4) carYear=2005
(5) carColor=Brown
(6) carPrice=11000
(7) carInventoryDate=2019-09-01

and so on.

Task#2. Output each object to a file (car1.txt) with the same format as shown in Task#1.

Car List

Record #1
(1) carID=0001
(2) carManufacturer=Mercury
(3) carModel=LeSabre
(4) carYear=2005
(5) carColor=Brown
(6) carPrice=11000
(7) carInventoryDate=2019-09-01

// sample c++ code for object to binary file IO.

// try c++ to compile this program

#include <iostream>

#include <fstream>

using namespace std;

class Student

{

public:

    char name[10];

    char address[10];

    char Gender;

    char DOB[10];

    Student()

    {}

};

int main()

{

    cout<<"\n Writting on file: Student1.txt \n";

  Student *p=new Student;

        cout<<1<<": ";

         cin>>p->name;

         cout<<"\n";

    // to append use ios::app

    // ofstream osfile("Student1.txt",ios::binary|ios::app);

    ofstream osfile("Student1.txt",ios::binary);

    osfile.write((char*)p,sizeof(Student));

    osfile.close();   

   cout<<"\n reading Student1.txt \n";

    Student *p2=new Student;

    ifstream isfile("Student1.txt",ios::binary);

    isfile.read((char*)p2,sizeof(Student));

    isfile.seekg(0);

    isfile.close();

        cout<<1<<": ";

        cout<<p2->name;

        cout<<"\n";

    return 0;

}

In: Computer Science

Hello everyone, I need to Research a Cloud Computing Service Level Agreement to describe what it...

Hello everyone, I need to Research a Cloud Computing Service Level Agreement to describe what it entails. Please point me to one that includes any of these components:

a break down of services provided and excjuled

costs for services

Duration of the agreement

Responsibilities of the customer and the service provider

In: Computer Science

Salary Raise: At the beginning of every year, you receive a raise on your previous year’s...

Salary Raise: At the beginning of every year, you receive a raise on your previous year’s salary.

Raise = Salary * Rate

Create an application that displays the amount of your annual raises and also your new salaries for the next ten years, using raise rates of 1.5%, 2%, 2.5%, 3%, 3.5%, 4%, 4.5%, 5%.

The input for the salary should come from an input box and should only allow a value between 10,000 and 100,000. Use a loop to validate the input.

In: Computer Science

Question about bat algorithm What are the main heuristics (or principles, or strategies) of the bat...

Question about bat algorithm

What are the main heuristics (or principles, or strategies) of the bat algorithm that make it works as the optimal heuristic search?

thanks

In: Computer Science

For this assignment, you will select a current research paper (published since 2016) to review. You...

For this assignment, you will select a current research paper (published since 2016) to review. You may select any research paper that is related to Data Science or Big Data Analytics. I strongly recommend that you start your search at Google Scholar . Once you enter your search term(s), select the "Since 2016" link on the left. Feel free to choose ANY relevant paper. (I would recommend that you select one that you can read and summarize in a reasonable amount of time. Don't select a 100 page paper!)

Need 200 words review on that paper

Please Don't rewrite already existing chegg answers

In: Computer Science

In DBMS, what would you use to obtain information about the Current logic structure of database?...

In DBMS, what would you use to obtain information about the Current logic structure of database?

How this informations recorded in the DBMS and who is responsible to maintain?

In: Computer Science

Racket/Scheme language [15p] create-mapping A map data structure is described as either a set of key-value...

Racket/Scheme language

[15p] create-mapping A map data structure is described as either a set of key-value pairs or a set of keys and a set of values whose relation is described by a function with a one-to-one mapping from keys to values. Write a function, create-mapping, which takes a list of symbols (keys) and a list of any type of Scheme values (vals) and returns a function that takes one symbol argument (the key) and returns the corresponding value. The mapping is determined by the position of the elements in the two lists.

For example: ;keys > (define roman-numerals-keys '(I II III IV V)) ;values > (define arabic-numerals-vals '(1 2 3 4 5)) ;

The pairs mapped will be: ;I -> 1 ;II -> 2 ;III -> 3 ;and so forth ;the (create-mapping) function returns a function that we bind for later use > (define roman-to-arabic (create-mapping roman-numerals-keys arabicnumerals-vals)) > (roman-to-arabic 'I) 1 > (roman-to-arabic 'V) 5 > (roman-to-arabic 'some-symbol) uncaught exception: "Could not find mapping for symbol 'some-symbol" ;hint: create the error message in a similar way you did for problem 14 of hw01.

In: Computer Science

Describe how Java creates a single dimension array and a double dimension array. Describe and explain...

Describe how Java creates a single dimension array and a double dimension array.


Describe and explain how Java processes the contents of a single dimension array.


Describe and explain how Java saves values to a single dimension array, and to a double dimension array.

In: Computer Science

what are the goals of network administration ?

what are the goals of network administration ?

In: Computer Science

1. Prove  that the backtracking algorithm will always return a correct solution (where possible) when solving a...

1. Prove  that the backtracking algorithm will always return a correct solution (where possible) when solving a game of peg solitaire.

2.Perform empirical analysis and compare the observation to the theoretical analysis. of backtracking algorithm

In: Computer Science

For this assignment, you will select a current research paper (published since 2016) to review. You...

For this assignment, you will select a current research paper (published since 2016) to review. You may select any research paper that is related to Data Science or Big Data Analytics. I strongly recommend that you start your search at Google Scholar (scholar.google.com). Once you enter your search term(s), select the "Since 2016" link on the left. Feel free to choose ANY relevant paper. (I would recommend that you select one that you can read and summarize in a reasonable amount of time. Don't select a 100 page paper!)

Need 200 words review on that paper

In: Computer Science