1

Topic: Saturday 10001000

!  and .
Throughout the task about 1000 queens http://www.sql.ru/forum/1270505/pyatnic … -1-million
Let's admit arrangement of queens for a board 8x8 is found
[spoiler] [img=https://qph.ec.quoracdn.net/main-qimg-1ea0f02e8f6403f4cd1e0796e087351a]
[/spoiler]
Arrangement is saved in a DB in a type:

insert into queen8x8 (id, position) values (1, ' a1b5c8d6e3f7g2h4 ');

Thus we remember that this arrangement has brothers whom it is possible
To receive by a board turn on 90 degrees some times or a way
Board mirroring horizontally or vertically or .
We can according to the logic of application or on the trigger to add some more
Lines in queen8x8 which consider "turns" and "mirrors".
In the task also it is meant that we can do search of decisions on
To the partial coincidence.  to find all combinations which correspond
To a certain start arrangement.

select * from queen8x8 where position like ' a1b5 __ d6e __ 7g2 __ ';

There was a question. We Can-whether create Domain-Index which will
To consider this moment? For the sake of place saving. For a board 10001000 cells.
P.S. Do not ask what for it it is necessary. Consider that it - simply brainstorming session
And the question "what for" is already transited and there is a question "as".

2

Re: Saturday 10001000

mayton;

like ' a1b5 __ d6e __ 7g2 __'

I houses, with myself, Russian    a clod always talk...
Who such

like ' a1b5 __ d6e __ 7g2 __'

?
Whether it is necessary to understand, what it is such b5 which on Saturday evening costs on the second position to "decision" record?
And who such d6e and 7g2? For the sight weakened by Saturday here or e and 7 superfluous if the sample fixes arrangement, or decently would be to show a pattern as they are connected to "domain" determination.
And the domain index can be constructed on any determined function, returning scalar value in itself suitable for an indexing.
To 12.2 it is possible to invent the record form, able to display the fact of that you interests
Queen installed in 4 verticals on 6 horizontals (something like ' 001005006 % ' to start yours  codings), or something another for what the variant of such text index would fit.
In 12.2 it is possible to build indexes on json-fields.
--------------
PS
Try to express the thoughts on the Prologue.
There can be it leads to absolutely other form of questions about indexes.

3

Re: Saturday 10001000

booby;
Oh, for 1000 4 character location it is required...

4

Re: Saturday 10001000

booby wrote:

booby;
Oh, for 1000 4 character location it is required...

and ' 00010005 ____ 0006 %'

5

Re: Saturday 10001000

booby wrote:

?
Whether it is necessary to understand, what it is such b5 which on Saturday evening costs on the second position to "decision" record?
And who such d6e and 7g2?

Yes. A misprint.

6

Re: Saturday 10001000

booby wrote:

And a domain index it is possible to construct on any determined function, returning scalar value in itself suitable for an indexing.

Is almost ready to agree. But in what then a difference between a domain index and an index on function?

7

Re: Saturday 10001000

Read only article with  specially to let a brain think without helps and it is not believed that it is such a hard task: each queen costs on the separate horizontal/vertical so unless it is difficult for the modern machines to check up the such... It is possible even to take probably 1024 for an equal bit mask.

8

Re: Saturday 10001000

mayton;
These terms can be used as synonyms.
But, besides, domain indexes specifically are understood as the special constructions living in own tables, supplied with quite normal indexes search on which goes special functions.
In particular, text indexes within the limits of Oracle Text, are supported by tables and the code living in the circuit ctx, and text indexes CTX - domain indexes in the second sense.
And json-indexes - syntactic sugar over text.
I.e. for support of domain indexes the domain mathematics uncovering "sense of the domain", auxiliary (normal) tables/indexes/codes providing the search which context is specific to the domain is necessary.
In this sense domain indexes can in any way corresponds that normally is understood as indexes, and not to have at all the form of the standard syntactic declaration.
Though for domains supported of a box oracle, something at syntax level as a rule is given.

9

Re: Saturday 10001000

xtender wrote:

Read only article with  specially to let a brain think without helps and it is not believed that it is such a hard task: each queen costs on the separate horizontal/vertical so unless it is difficult for the modern machines to check up the such... It is possible even to take probably 1024 for an equal bit mask.

To check up - it is possible. It is not difficult. I speak. To ask "what for" - it is not necessary.

10

Re: Saturday 10001000

xtender wrote:

Read only article with  specially to let a brain think without helps and it is not believed that it is such a hard task: each queen costs on the separate horizontal/vertical so unless it is difficult for the modern machines to check up the such... It is possible even to take probably 1024 for an equal bit mask.

The being put in computing complexity of the task.
Logically it is possible to see the task as divided into two parts:
1) to generate all possible combinations of layout n queens on a board nxn
2) to select among them "correct" - with reference to queens - such where on each vertical the queen is allocated and it does not fight any other of the placed.
In the essence it is the arithmetical task which description is at Gika in the book "Chess and mathematics":
The dial-up number from 1 to n is given
The private decision considers sequence number from 1 to n such that:
- All numbers are used
- Any does not repeat twice
- If n - the maximum (last) number, i - position number, and f (i) - number written down in a position i:
The sequence f (i) + i gives a dial-up of not repeating numbers and
b) the sequence f (i) + n - i + 1 also gives a dial-up of not repeating numbers.
For such dial-ups it is known that if i, j - positions and i <j <=n, abs (f (i)-f (j)) <> (j - i)
Initiating question - how to receive all possible arrangements.
The question considered on one million - about obtaining of a subset of arrangements on a board 1000x1000 such that employment of a part of positions is an input statement of the problem provided that decisions can be received for polynomial time.
Merits of case here that in itself generation of arrangements without repetitions asymptotically occupies order time n!.
And it is completely not obvious, how the knowledge of a part of arrangement helps  to leave from continuous generation of all.
(Sort reasons "we interrupt generation as soon as we understand that the result does not correspond to rules" do not suit, wait for a method of a sort of addition/multiplication)
And sense of the task on the substance of such - whether such algebraic properties of demanded arrangements which allow to apply some regular mathematics can be revealed
On the revealed algebraic structures so that the general seek time of the decision appears below factorial in sense O-big.
With reference to databases a question - how to accelerate the two-phase process consisting of a phase of record of a data set in the table and a phase of superimposing of the filter, by sharp abbreviation of data volume on a phase of adding of records.

11

Re: Saturday 10001000

mayton wrote:

P.S. Do not ask what for it it is necessary. Consider that it - simply brainstorming session
And the question "what for" is already transited and there is a question "as".

smile)) smile)) smile))

wrote:

Scientists from Sent-Endrjussky university (Great Britain) offered one million dollars for a solution of the ancient chess task. On it it is informed on a university site.
...
The decision for a standard board in 64 cells has been found in 1850. With magnification of field sizes and amounts of figures the task becomes complicated. Researchers found out that if the size of a board to increase to 1000 by 1000 cells, computer programs start to hang up.
...

.....
stax

12

Re: Saturday 10001000

All read a topic-parent at first.

13

Re: Saturday 10001000

mayton wrote:

in what then a difference between a domain index and an index on function?

that for a domain index there are auxiliary structures -  for Oracle Text example.
The index on function simply indexes expression.
For your task you write function which expression leads to "canonical form" and it index.

mayton wrote:

All read a topic-parent at first.

For the person with computer science formation that topic does not carry any additional semantic loading.
In programming is often very problematic to prove that more simple algorithm does not exist;
Therefore some Universities can  over laymans formulating similar tasks.
Being returned to the real world, in 99 % a case it is necessary to find not all decisions, and optimal. And already for it there is a row of the settled approaches.
I still many years ago experimented the genetic algorithm which perfectly found the decision for 1000 + queens on my weak PC.
PS. Not absolutely clearly why you decided to get with this "original" task into a branch of Orakl.

14

Re: Saturday 10001000

dbms_photoshop wrote:

PS. Not absolutely clearly why you decided to get with this "original" task into a branch of Orakl.

I search for application for DI. Queens - simply occasion.

15

Re: Saturday 10001000

mayton;
Molecules indexed somehow.

16

Re: Saturday 10001000

mayton wrote:

it is passed...
I search for application for DI. Queens - simply occasion.

http://docs.oracle.com/database/121/ADDCI/ext_idx_frmwork.htm#ADDCI4390 wrote:

When to Use Extensible Indexing
Oracle's built-in indexing facilities are appropriate to a large number of situations. However, as data becomes more complex and applications are tailored to specific domains, situations arise that require other approaches. For example, extensible indexing can help you solve problems like these:
Implementing new search operators using specialized index structures
You can define operators to perform specialized searches using your index structures.
Indexing unstructured data
The built-in facilities cannot index a column that contains LOB values.
Indexing attributes of column objects
The built-in facilities cannot index column objects or the elements of a collection type.
Indexing values derived from domain-specific operations
Oracle object types can be compared with map functions or order functions. If the object uses a map function, then you can define a function-based index for use in evaluating relational predicates. However, this only works for predicates with parameters of finite range; it must be possible to precompute function values for all rows. In addition, you cannot use order functions to construct an index.

And in the same Data Cartridge Developer's Guide specific examples

 Part III Scenarios and Examples
Click to expand 15 Power Demand Cartridge Example
Click to expand 16 PSBTREE: Extensible Indexing Example 

Pay attention that function ODCIIndexCreate for user defined domain indexes creates and interposes the data into the auxiliary table ().

17

Re: Saturday 10001000

dbms_photoshop, OK thanks.