Questions tagged [sequence]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
3answers
275 views

Algorithm for optimizing text compression

I am looking for text compression algorithms (natural language compression, rather than compression of arbitrary binary data). I have seen for example An Efficient Compression Code for Text ...
1
vote
1answer
149 views

How do I create a comparable checksum of a number sequence?

Sorry if the title is confusing, but here's an example to illustrate what I'm trying to accomplish. I would like to create a 'checksum' or ID grouping of similar number sequences, so that when you ...
3
votes
1answer
296 views

Design patterns for handling patterns in object sequences

There some times appears a task when you have a sequence of object and you need perform some action when a particular pattern (subsequence?) occurs. As more concrete example we can imagine a log ...
0
votes
1answer
892 views

Algorithm to create a superincreasing sequence

I am building an implementation of the [Merkle-Hellman Knapsack Cryptosystem] for my study.(https://en.wikipedia.org/wiki/Merkle%E2%80%93Hellman_knapsack_cryptosystem) One of the things I would like ...
-1
votes
1answer
835 views

Find missing number in sequence in string [closed]

I have a string that contains numbers in sequence. There are no delimiters between numbers. I have to find missing number in that sequence. For example: 176517661768 is missing the number: 1767 ...
0
votes
3answers
94 views

How to optimize iterable queries with external arguments

I will use C# here as an example, but my question is about any language. My question is from framework to compiler perspective (i.e the solution can be by implementing given idea inside compiler) ...
4
votes
3answers
657 views

Determine frequency-range that matches closest to input list of frequencies

Since this question is not about "code not working", I'm asking my first question here instead of StackOverflow. Inform me if any required information is missing from the question. Setup: I have two ...
2
votes
1answer
243 views

Figuring out the mean of a stream of data, disregarding values that are way off bounds

I have a stream of integer data and want to perform some statistical analysis on it. I want to calculate the mean and the standard deviation of it. So far it isn't hard, but keep in mind that I am ...
2
votes
2answers
351 views

Shuffle/Randomize a collection without knowing the number of items? [closed]

Let's say I have a sequence of items of unknown length, n. I want to randomize the order of this sequence without having to go through the entire sequence. Are there any algorithms that can do this? ...
3
votes
1answer
438 views

Why sequences are recommended as conventional interfaces?

From the reference of berkeley's version of sicp text, It is mentioned that: Expressing programs as sequence operations helps us design programs that are modular. That is, our designs are ...
-1
votes
2answers
2k views

'Tuple' vs 'List' operations in python

Only two operations are allowed on tuple, as shown below. Operations like insert / delete at an index is not allowed. I learnt that tuple is an immutable data model. list allows insert and delete ...
0
votes
1answer
641 views

Number of sequences when no adjacent items can be the same

I came across this one problem, There is a particular sequence only uses the numbers 1, 2, 3, 4 and no two adjacent numbers are the same. Write a program that given n1 1s, n2 2s, n3 3s, n4 4s ...
3
votes
2answers
352 views

Strategy game, how do I calculate the parallel actions?

I am building a strategy game where multiple units(5 - 20) fighting each other. I have a game logic that calculate all the actions that been done on each turn, and send it to the game engine to ...
0
votes
4answers
1k views

Separating merged array of arithmetic and geometric series [closed]

Given an array of positive integers in increasing order. Separate them in two series, an arithmetic sequence and geometric sequence. The given array is such that a solution do exist. The union of ...
1
vote
1answer
4k views

how could I draw the database transaction commit in the sequence diagram

How could I draw the database transaction commit in the sequence diagram? EDIT I want to draw in sequence diagram database transaction commit/rollback process
5
votes
1answer
20k views

Difference between statechart and sequence diagram

I realise these two diagrams are very similar, with the obvious difference one models the sequence of a certain function, whilst the other models the state throughout a function being carried out. ...
1
vote
1answer
2k views

What is a combined fragment in a UML Sequence Diagram?

Everything is in the question. I just discover this new feature and I don't really understand what it stands for. I know that it can represent loop, alternative in the sequence diagram. Can someone ...
0
votes
2answers
206 views

How to do this in Standard UML?

In the below Sequence diagram, when the user have entered the Username and Password, I have to do the authentication. Now you can see two details valid details and invalid detail in the diagram , ...
5
votes
2answers
270 views

Is there a common mathematical symbology for collections?

I am being asked to define several of my algorithms in mathematical terms to describe my work to a customer. I am trying to determine if anybody knows whether common operators for collections like ...
5
votes
4answers
2k views

What's stopping Oracle from supporting identity (auto-numeric) columns? [closed]

EDIT: As gavenkoa's answer points out, Oracle Database 12c (released a couple of years after this question was asked) has support for Identity Columns. As far as I know, Oracle's RDBMS is one of the ...