Twitter

HX1 tip and tricks: Sony Talk Forum: Digital Photography Review

Category : Photography

This is one of the excellent short and sweet tips for using Sony HX1.

Print it and keep it in your camera bag with you.

HX1 tip and tricks: Sony Talk Forum: Digital Photography Review.

Sample Numeric Patterns

Category : Algorithms, Scripts

In this post, I will use a generic model for phone numbers that has a 3-digit prefix and a running width of 7 digits.

To start, I will fix the prefix to be 123, so P1=1 P2=2, P3=3. The 7-digit running numbers will give us 10,000,000 numbers starting from 0,000,000 up to 9,999,999

Again, we will name each digit from the running numbers as n1, n2, .. n7.

Class 1 numbers: Examples of unique patterns

  • Full ascending: (1 instance per 10,000,000)
    • 123-4567890
  • Ascending running: (4 per 10,000,000)
    • 123-012 3456
    • 123-123 4567
    • 123-234 5678
    • 123-345 6789
  • Descending running: (4 per 10,000,000)
    • 123-987 6543
    • 123-876 5432
    • 123-765 4321
    • 123-654 3210
  • Million pattern: (9 per 10,000,000)
    • 123-a0000000 [ a ≠ 0 ]
  • Repeated prefix: (10 per 10,000,000)
    • 123-123 a 123 123
  • Repeated inverted prefix: (10 per 10,000,000)
    • 123-321 a 123 321
  • 7 Repeated digits: (9 per 10,000,000)
    • 123-aaa aa aa [ a ≠ p3 ]
  • 8 Repeated digits: (1 per 10,000,000)
    • 123-333 33 33
  • Named numbers: (counts depend on the name)
    • 123-Mohamed = 123-6642633 (1 per 10,000,000)
    • 123-Ahmed xx = 123-24633 xx (100 per 10,000,000)
    • 123-Mark xxx = 123-6275 xxx (1,000 per 10,000,000)

Class 2 numbers:  Examples for the 2 digits, adjacent sets

  • 6A1B pattern: (18 per 10,000,000), [b ≠ a]
    • 123-aaa aaa b
    • 123-b aaa aaa
  • 5A2B pattern: (162 per 10,000,000, [b ≠ a]
    • 123-aaa aa bb
    • 123-bb aaa aa
  • 4A3B pattern: (1,458 per 10,000,000), [b ≠ a]
    • 123-aaaa bbb
    • 123-bbb aaaa
  • 4A3B alternate pattern: (1,458 per 10,000,000), [b ≠ a]
    • 123-ab ab ab a
    • 123-ba ba ba b
  • Ascending twins: assume z = y+1, y = x+1. (144 per 10,000,000)
    • 123-ax ay az a
    • 123-a ax ay az

Class 3 numbers: Examples of the 2 digits, non adjacent numbers

  • 6A1B split: (45 per 10,000,000), [b ≠ a]
    • 123-ab aaa aa
    • 123-aab aa aa
    • 123-aaa b aaa
    • 123-aa aa baa
    • 123-aaa aa ba
  • 5A2B split:(1,134 per 10,000,000), [b ≠ a]
    • 123-abb aa aa
    • 123-ab ab aaa
    • 123-a baa baa
    • 123-ab aaa ba
    • 123-ab aaa ab
    • 123-aa bb aaa
    • 123-a ab ab aa
    • 123-aab aab a
    • 123-aab aaab
    • 123-aaa bb aa
    • 123-aaa ba ba
    • 123-a aab aab
    • 123-aa aa bba
    • 123-aa a ab ab

As you can see, the more different digits we add, the more variations we can generate. We may also play with relations between numbers by adding one or more relations of the below:

  • Ascending  / descending
  • twins (e.g. aa bb cc …)
  • Multiples (e.g. 15 20 25)

In the next blog post, I will take some samples and start building an Excel generator to generate lists of numbers in a given pattern. this is actually the base of building the integrated dial classification module.

Good bye for now..

1

Anatomy of numbers

Category : Algorithms

A basic structure of numbering system can split any number to 2 basic sections:

  1. Prefix, which is a set of digits or letters identifying the “series” the subject number belongs to
  2. Running or functional part, which contains the numeric unique value

In many cases, there can be some additional parts of the numbers like suffix, parity flag, or error correction codes. But we will assume the simple form of 2-part numbers as described above.

A prefix can be a set of digits or letters or a mix of digits and letter. There are two important notes related to the presence of prefix,

  1. It adds to the length of the number
  2. It can be a part of the number classification.

As an example, a prefix in mobile dial numbers like 012 will add 3 more digits to the length of the running number as well it can help classify dial numbers like 012-34xxxxx as an easy number because it simplifies the way you can recall it (01234 is a straight ascending set of digits).

We will fix a notation for prefix digits as P1, P2, P3

Running numbers also include 2 important factors

  1. The count of digits which indicate maximum possibilities of digit combination (referred to as series length), and this can be easily estimated by the formula

    Series length = 10 to the power n

  2. It indicates the level of complexity to classify the numbers, the longer running code, the more complex classification is

We will fix a notation for running digits as d1, d2, d3, … , dn


Formation of a simple number pattern

Now, let’s start the fun, the following example shows how a classified pattern will look like.

A simple “4 twins number” may look like:

  • P: AABBCCDD
  • P is the full prefix
  • A, B, C, D: unique digits
  • D1 = D2 = A
  • D3 = D4 = B
  • D5 = D6 = C
  • D7 = D8 = D

When applying this “rule” to a series of 8 digit numbers, we can extract a lot of numbers in the 4-twins category like:

  • P: 33 99 22 00, P: 44 99 22 33

Note that a problem will arise for some numbers in this pattern like the number (P: 22 33 44 55) as it will fall between two categories, 4-twins and 4-ascending-twins.

In the next article, I will focus on patterns and the hierarchy of classification so we can understand how to solve such problem.