What does this algorithm print? - Tarleton State University...Not copyright infringement, because,...

39
What does this algorithm print?

Transcript of What does this algorithm print? - Tarleton State University...Not copyright infringement, because,...

Page 1: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

What does this algorithm

print?

Page 2: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Academic Integrity

• Plagiarism

• Ghostwriting

• Fabrication

• Copyright infringement

• Other forms of cheating

Page 3: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Can you think of:

• A case that is both plagiarism and copyright infr.?

• A case of plagiarism that is not copyright infr.?

• A case of copyright infr. that is not plagiarism?

• Plagiarism

• Ghostwriting

• Fabrication

• Copyright infringement

• Other forms of cheating

plagiarismcopyright

infringement

Page 4: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

• A case that is both plagiarism and copyright infr.:

Copying text from an existing published book (the publisher holds the copyright) into my own book, without permission or acknowledgement.

Read for next time:

• Computer Security textbook plagiarism epidemic

• Stealing self-published books

(links also on our webpage)

Page 5: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

• A case of plagiarism that is not copyright infr.?

Copying text from a book that’s in the public domain (it has no copyright) into my own book, without permission or acknowledgement.

All copyrights eventually expire.See, for instance Project Gutenberg.

Page 6: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

• A case of copyright infr. that is not plagiarism?

Copying a lot of text from an existing published book (the publisher holds the copyright) into my own book, while acknowledging the source.

Quoting short phrases or paragraphs is OK, as it falls under fair use.

Read for next time: What is fair use?(link also on our webpage)

Page 7: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Source: https://xkcd.com/518/

Page 8: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Cheating is “in the eye of the beholder”?

Example:

On a test, you have to convert 42 into binary.

Is it OK to use the Windows calculator?

Page 9: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Cheating is “in the eye of the beholder”?

Example:

On a test, you have to convert 42 into binary.

Is it OK to use the Windows calculator?

Answer: It depends what class you’re in … but if you do it, you have to say so in your solution!

Not in any CS freshman class, unless specifically instructed to do so!

Page 10: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Example:

Your homework in COSC 2341 requires to write a program in C++ to insert numbers in a binary tree.

You go to Wikipedia, find a program,

rename the variables, and present it

as your own.

Page 11: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Example:

Your homework in COSC 2341 requires to write a program in C++ to insert numbers in a binary tree.

You go to Wikipedia, find a program,

rename the variables, and present it

as your own.

• Plagiarism? YES• Copyright infringement? NO

Page 12: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Example:

In COSC 1302, you’re assigned an end-of-chapter problem from the Computer Science Illuminated text.

You “google” the problem number, find the solution from the Instructor’s Manual, and present it as your own.

Posting any copyrighted material online w/o permission is illegal!

Page 13: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Cheating is “in the eye of the beholder”?

Example:

Your homework in COSC 2341 requires to write a program in C++ to insert numbers in a binary tree.

You go to Wikipedia, find a program,

rename the variables, and present it

as your own.

Page 14: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

“If it involves technology, it’s not cheating”?

A. You bring a memory sheet to an exam (for which memory sheets are not explicitly allowed by the instructor)

B. You secretly store formulas in the memory of your calculator (calculators are allowed, but memory sheets are not)

Page 15: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Involuntary Plagiarism““Often, I will see freshmen quote the president of the United States in a [local story],” Swartzlander said. “I’ll turn to the writer to ask: ‘When did you interview the president?’ They’ll often give me a blank look and say they saw the interview on TV and quoted from it.””

Source: 10 ways to prevent plagiarism, fabrication at college newspapers (and in any newsroom) by Mallary Jean Tenorehttp://www.poynter.org/how-tos/digital-strategies/190754/10-ways-to-prevent-plagiarism-fabrication-at-college-newspapers-and-in-any-newsroom/

Page 16: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Answer:Not plagiarism, because the source is acknowledged.Not copyright infringement, because, although the work is copyrighted, this is fair use:• Quoting a relatively short paragraph for purpose of illustration• Non-profit educational use

Page 17: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Better safe than sorry:

When in doubt, ask the instructor!

Page 18: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Other forms of cheating

• Paraphrasing (w/o acknowledging the source)

• “Secondary sources” plagiarism

• Presenting someone else’s ideas as your own

Page 19: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Oh, irony!

Page 20: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Reading activity

• Read the “Google vs. Oracle” article linked on our webpage.

• Answer the questions on the next page

Page 21: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

• What is an API?

• How many of Oracle’s APIs did Google use?

• What was Google’s product? What was Oracle’s product?

• What was the original company that developed Java?

• Was Oracle involved in smartphone technology?

Page 22: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Flipping bits

a.k.a.

Error detection (and correction)

Page 23: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

7-bit ASCII Character Set

23

Source: Computer Science Illuminated 5th edition, by N. Dale and J. Lewis

Page 24: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

• Let’s consider the character 'A' , whose ASCII code is …

Page 25: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

• Let’s consider the character 'A' , whose ASCII code is 65

• Convert 65 to unsigned binary (7 bits): …

Page 26: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

• Let’s consider the character 'A' , whose ASCII code is 65

• Convert 65 to unsigned binary (7 bits): 100 0001

• Now let’s add an 8th bit to complete the Byte: 100 0001?

Page 27: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

• Let’s consider the character 'A' , whose ASCII code is 65

• Convert 65 to unsigned binary (7 bits): 100 0001

• Now let’s add an 8th bit to complete the Byte: 100 0001

• In the hardware, all bits need to have of value of either 0 or 1 – what to do?

?

Page 28: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

100 0001

Solution: Fill in that value which makes the total # of ones even (a.k.a. even parity)

0

Page 29: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Practice:

Fill in the 8th bit to obtain even parity

100 0001

100 0010

100 0011

011 1011

Page 30: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Practice:

The following 8th bit codes have been recovered from a broken disk. Which ones are correct?

1011 0001

1100 0010

0011 0011

0111 1111

Page 31: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Practice:

The following 8th bit codes have been recovered from a broken disk. Which ones are correct?

1011 0001

1100 0010

0011 0011

0111 1111

In these incorrect codes, can we tell

which bit was changed?

Page 32: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Practice:

The following 8th bit codes have been recovered from a broken disk. Which ones are correct?

1011 0001

1100 0010

0011 0011

0111 1111

Can we be absolutely sure that these codes have no

errors?

Page 33: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Conclusions

One-bit parity codes:

• Detect any isolated errors

• Detect any odd # of errors

• Cannot detect any even # of errors

• Cannot correct any # of errors

Page 34: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Row and column parity

Image source: http://intronetworks.cs.luc.edu/current/html/packets.html

Page 35: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Row and column parity

Image source: http://intronetworks.cs.luc.edu/current/html/packets.html

Why do we need this bit?

Page 36: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Your turn!

Fill in the parity bits for this matrix:

Page 37: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Your turn!

Fill in the parity bits for this matrix:

Page 38: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Your turn!

Find and correct the error in this matrix:

Page 39: What does this algorithm print? - Tarleton State University...Not copyright infringement, because, although the work is copyrighted, this is fair use: • Quoting a relatively short

Your turn!

Find and correct the error in this matrix:

This bit is corrected to 1