Sorted List Merging via Array Pair Alternation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for merging sorted lists, such as the priority queue method, are inefficient and complex, particularly for modern processors that excel in sequential operations.

Innovation Solution

The method uses a pair of arrays to merge multiple input sorted lists in multiple phases, where the first array is contiguously populated with input sorted lists, and intermediary merged lists alternate between the arrays, optimizing the merging process through sequential read and write operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the priority queue method is used to merge sorted lists, then the merging can be performed with multiple input lists, but the processing efficiency is low and the operation complexity is high

Engineering Contradiction:
Improvemerging efficiencyVSAvoidoperation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The merging process is divided into multiple phases, where each phase merges a subset of sorted lists. In the first phase, input lists are merged in pairs; in subsequent phases, the intermediate results are merged with remaining input lists. This segmentation reduces the complexity of each individual merging operation while maintaining overall efficiency.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The algorithm uses periodic phases of merging operations, where each phase processes a specific subset of lists. The merging alternates between different combinations of lists across phases, creating a periodic pattern of operations that optimizes processor utilization and reduces overhead.

Inventive Principle:
Principle #19Periodic action

2Productivity

If the priority queue method is used, then multiple sorted lists can be merged, but it does not leverage sequential read and write operations efficiently

Engineering Contradiction:
Improvesequential operation efficiencyVSAvoidprocessor compatibility
Core Design Contradiction:
ProductivityVSEase of operation

Solution Approach 1:

The algorithm uses two arrays (A and B) where data is copied between them in a sequential manner. Array A is filled with input lists, then merged results are copied to Array B, and this process repeats in alternating phases. This copying mechanism between arrays enables efficient sequential read and write operations that modern processors can execute rapidly.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The algorithm transitions from a single-dimensional priority queue structure to a two-dimensional array structure with alternating phases. By using two arrays and alternating between them across multiple phases, the algorithm creates an additional dimension of organization that enables sequential access patterns and improves cache utilization.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Productivity

If traditional merging methods are used, then sorted lists can be merged, but the number of write operations is high

Engineering Contradiction:
Improvewrite operation countVSAvoidprocessing time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The algorithm merges multiple sorted lists by combining them in pairs during each phase, reusing the merged results from previous phases. This combining approach reduces the total number of write operations compared to processing each list separately, as intermediate merged results are preserved and reused in subsequent phases.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentEP2997461B1Merging of sorted lists using array pair
Publication Date: 2020.02.19 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP2997461B1 patent drawingFigure 1
  • EP2997461B1 patent drawingFigure 2
  • EP2997461B1 patent drawingFigure 3

AI summary

The formulation of a merged sorted list from multiple input sorted lists in multiple phases using an array pair. Initially, the first array is contiguously populated with the input sorted lists. In the first phase, the first and second input sorted lists are merged into a first intermediary merged list within the second array. Each subsequent phase merges a prior intermediary merged list resulting from the prior phase and, a next input sorted list in the first array to generate a next intermediary merged list, or a merged sorted list if there or no further input in the first array. The intermediary merged lists alternate between the first array and the second array from one phase to the next phase.