------
## 最终结论
```python
def shortest_instructions(target):
    from collections import deque

    # Initial position and speed
    position = 0
    speed = 1
    
    # Queue for BFS, initialized with (position, speed, instruction count)
    queue = deque([(position, speed, 0)])
    
    # Set to keep track of visited states to avoid cycles
    visited = set()
    
    while queue:
        pos, spd, instructions = queue.popleft()
        
        # Check if we have reached the target
        if pos == target:
            return instructions
        
        # Calculate new states for acceleration and reversal
        new_pos_accel = pos + spd
        new_spd_accel = spd * 2
        
        new_pos_reverse = pos
        new_spd_reverse = -1 if spd > 0 else 1
        
        # Add new state from acceleration to the queue if not visited
        if (new_pos_accel, new_spd_accel) not in visited:
            visited.add((new_pos_accel, new_spd_accel))
            queue.append((new_pos_accel, new_spd_accel, instructions + 1))
        
        # Add new state from reversal to the queue if not visited
        if (new_pos_reverse, new_spd_reverse) not in visited:
            visited.add((new_pos_reverse, new_spd_reverse))
            queue.append((new_pos_reverse, new_spd_reverse, instructions + 1))

# Example usage:
print(shortest_instructions(3))  # Output: 2
print(shortest_instructions(6))  # Output: 5
```