Name (print *CLEARLY*): _________________________________________________


Student ID (print *CLEARLY*; 1 digit per underline): _____ _____ _____ _____ _____ _____

CSE 231s Quiz 20: K-Mer Counting and Atomics

1) K-Mer Counting

Imagine you have a DNA sequence of length N
comprised of adenine (A), guanine (G), cytosine (C), and thymine (T) nucleotide bases. 

A) How many k-mers of length K are there to inspect in the sequence?

 

 

 

 

B) How many possible different k-mers of length K could there be?

 

 

 

 

C) How is each number significant when it comes to the possibility and appropriateness of data structure choices in a k-mer counting application?

 

 

 

2) Atomics

Given the following documentation for AtomicInteger get, compareAndSet, and incrementAndGet:

AtomicInteger get

AtomicInteger compareAndSet

AtomicInteger incrementAndGet

A) Write pseudocode for incrementAndGet() invoking only get and compareAndSet methods below:

 

 

 

 

 

 

 

B) Decribe how the code would perform under different levels of contention (high, medium, low) below: